Python + Django Configuration Backend Management system

Source: Internet
Author: User

1. Create Project

django-admin.py Startproject NewProject

After completing the last step, you can find that a folder named NewProject, a manage.py file, is generated under the NewProject folder.

The NewProject folder also contains 4 files:

__init__.py

setting.py

urls.py

wsgi.py


Project is now complete!

2. Modify the file

#vim urls.py

From django.conf.urls.defaults import patterns, include, url

# Uncomment the next lines to enable the admin:
From Django.contrib Import admin
Admin.autodiscover ()

Urlpatterns = Patterns ("',
# Examples:
# URL (R ' ^$ ', ' csvt01.views.home ', name= ' home '),
# URL (R ' ^csvt01/', include (' Csvt01.foo.urls ')),

# Uncomment the Admin/doc line below to enable admin documentation:
# URL (R ' ^admin/doc/', include (' Django.contrib.admindocs.urls ')),

# Uncomment the next line to enable the admin:
URL (r ' ^admin/', include (Admin.site.urls)),
)
Get rid of the red position #


#vim setting

Installed_apps "Django.contrib.admin" in the line of comments

Additional configuration database


3. Create a database table

#python manage.py syncdb

Follow the prompts to enter your account password



4. Open the test service

#python manage.py Runserver


This article is from the "Jeff" blog, so be sure to keep this source http://zhangxz.blog.51cto.com/5490116/1564856

Python + Django Configuration Backend Management system

Related Article

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.