This article mainly introduces Django's installation and creation project helloword in Win7. If you need it, you can refer to one of the popular python programming languages, this article briefly describes how to install and develop the python django framework.
The installation and creation project hello word of Django in Win7 is relatively simple. Here, commands and code are provided directly. If you do not understand it, you can refer to relevant materials.
1. installation:
The command is as follows:
Pip install Django = 1.6.5
2. Create a project
Django-admin.py startproject web
Modify urls. py
Url (R' ^ blog/index/$ ', 'blog. views. Index '),
3. Create a project:
Django-admin.py startapp blog
Modify:/blog/views. py
Add:
From django. http import HttpResponsedef index (req): return HttpResponse ("hello world ");
4. Start the built-in Server
Python manage. py runserver
Access page:
Http: // 127.0.0.1: 8000/blog/index/