摘要:
(一)设置自动admin应用打开settings.py的INSTALL_APPS中的'django.contrib.auth'下面添加'django.contrib.auth','django.contrib.admin',再次运行manage.py syncdb,生成django_admin_log(二)修改ulrs打开mysite\mysite\urls.py文件,改为from django.conf.urls import patterns, include, url# Uncomment the next two lines to ena 阅读全文
摘要:
(一)创建项目django-admin.py startproject mysite运行这个命令时,需要django-admin.py在PATH环境变量中我的django-admin.py在 Django目录\Django-1.4.1\django\bin中此时目录结构为mysite│ manage.py│ ├─blog│ models.py│ tests.py│ views.py│ __init__.py│ └─mysite settings.py settings.pyc urls.py urls.pyc wsgi.py wsgi.pyc __init__.py __init__.pyc( 阅读全文