Simple tutorial on installing and creating a Django project in Win7

Source: Internet
Author: User
Tags install django pip install django
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/

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.