Build a django development environment under windows7

Django is an open source Model-View-Controller (MVC) style web application framework powered by the Python programming language.

Using Django, we can create high-quality, easy-to-maintain, database-driven applications in minutes.

Tools/Materials

  • python 3.6.4
  • django 2.0.5

method/step

1. Install python

The installation of python has been described in detail in " 01 Installing Python under Windows 7 System ";

2. Install ipython

ipython is a python interactive shell, which is much easier to use than the default python shell, supports variable auto-completion, auto-indentation, supports bash shell commands, and has built-in many useful functions and functions. Under Windows 7, just pip install ipython is installed and started through ipython.

pip install ipython
ipython

3. Install django

(1), install through pip under windows 7 as long as pip install django is installed.

pip install django

(2), can also be installed through the source code, git clone https://github.com/django/django.git to download the source code; install through python setup.py install;

4. Create the first django application

After installing django, there will be a django-admin command, which can be created by django-admin startproject HelloWorld;

django-admin startproject HelloWorld

Enter the directory to start the application through python manage.py runserver

cd HelloWorld
python manage.py runserver

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325300367&siteId=291194637