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