我是 Django 的新手。我正在尝试创建基本的管理面板。当我更改 urls.py 文件并将 url(r'^admin/', include(admin.site.urls)), 放入模式时,它给出了如下错误:
Request Method: GET return
Request URL: http://127.0.0.1:8000/
Django Version: 1.4
Exception Type: ImportError
Exception Value:cannot import name admin
Exception Location:/home/ulascan/Desktop/projects/purple/purple/urls.py in <module>, line 1
Python Executable: /usr/bin/python
Python Version: 2.7.3
Python Path:
['/home/ulascan/Desktop/projects/purple',
'/usr/lib/python2.7',
'/usr/lib/python2.7/plat-linux2'
...
...]