Django First Met

As demanded by my instructor, I need to grab the essence of Django in three weeks, which is not quite possible for a non-native CS candidate. Still, I struggled to follow the instructions given in the official document, and, well, not THAT official, that I’m actually doing a step by step tutorial in mandarin, which lags in the version of 1.10.5 instead of the newly announced 2.0. But this doesn’t trouble me at all since Anaconda also doesn’t provide the latest 2.0 update in the repertoire.

So I just began.

Implementing Virtual environment

I heard that functions in Django differ across various versions, and to save the trouble I implemented in virtual envs in Anaconda.

Simply create a new env use:

>conda create -n Django1

Activate it:

>activate Django1

And install the proper version of Django:

(django1) >conda install Django=1.10.5

Create Django Project

In workspace directory, use:

(django1) >django-admin startproject blogproject

Be sure to stay in the virtual env.

Test the server

To start the local server iIn blogproject directory use:

(django1) >python runserver

Then visit localhost:8000 in a browser.