随笔分类 - Python
-
NameError: name 'admin' is not defined 解决问题的方法
摘要:步骤: 1、修改settings.py。在INSTALLED_APPS设置中添加“django.contrib.admin”。 2、运行python manage.py syncdb更新数据库 3、修改urls.py。改为: # Uncomment the next two lines to enable the admin:from django.contrib import adminadmin.autodiscover() # Uncomment this for admin:(r'^admin/', include('django.contrib.admin.u 阅读全文
浙公网安备 33010602011771号