In the first week, we are going to set up a working environment and get a basic Django app up and running. If you are still new to django, I would suggest following the video tutorials here. You will need to know a little python, although, you can easily learn this along the way.
Follow the steps below to get started with the project
Note:
- We strongly recommend you to use Ubuntu or a Linux-distro for development.
- We also recommend you to install PyCharm Professional Edition which you can get for free by applying for the GitHub Student Education Pack. PyCharm is an IDE in which we will write python code for the project.
- Follow Steps 1-4 in this tutorial to install python
- Open a terminal, run
pip3 install django
Here is where you get to learn the basics of Git. Currently, you can find the project code here. You will be able to understand the code structure if you have gone through the videos. Now, before we get this code onto your computer let's first set up git. Open a terminal and execute the commands below
sudo apt update
sudo apt install git
git config --global user.name "Your Name"
git config --global user.email "[email protected]"
Also, you can check out this cool website where you can learn Git by experimenting.
In this step, we will clone the project from GitHub to your computer so that you can edit and run the server locally. It is good practice to fork the repository into your GitHub account and then pull it locally on your machine.
- First, go to the repository and fork it using the
fork
button. You can find it in the top right-corner next tostar
andwatch
. - Go to your GitHub profile home - https://github.com/your-username-here . You should be able to see the crispy-ai repository forked from oss2019. If yes, then your good to proceed.
- Fire up a terminal and navigate to a folder where you wish to download the code to. Execute the following command :
git clone https://github.com/your-username-here/crispy-ai
- Once it's done, you should be able to see the repo saved locally in the folder in which your terminal was opened. You can verify this by typing
ls
and enter in the terminal.
- Launch PyCharm or any other editor like Sublime Text 3. Click Open -> choose the folder 'crispy-ai' where you cloned it in the previous step. (If you get a pycharm name error, rename 'crispy-ai' => 'crispy_ai' and proceed)
- You might get an error asking you to setup a project interpreter. Goto File -> Settings -> Project -> Project Interpreter -> Click the gear icon and add new interpreter -> install the packages mentioned in requirements.txt
- You may also run
pip3 install -r requirements.txt
instead after setting up a virtual environment. See this link
- Open the terminal in the project root folder. Execute
python3 manage.py runserver 8000
- Open a browser and goto
localhost:8000
- If the site loads without errors, you are ready to start contributing!
- In case something's already up on port 8000, you can try shutting down that process or running this django server on a different port.
Do see the Contribution Guidelines