Django learning journey #1: Setting up

This works on Mac.

First install Python 2 and Python 3 in your computer. Then, install virtualenv and virtualenvwrapper so that each django project that we create will have different environment from each other, e.g. python version.

Then, make a virtual environment with your desired python version. Use workon and deactivate to work on and deactivate the virtual environment. Now, we want to work on virtual environment. Deactivate the virtual environment after finishing the tutorial.

If you want to use PostgreSQL instead of the default SQLite, install Postico and Postgres app.

Run the following to install Django:

Run the following to start a Django project:

Run the following to run the Django project:

and hopefully you can see the url from your command prompt, paste it in your browser and you will see the default Django page.

Leave a Reply