Tôi gặp một số vấn đề với quản trị viên Django.Quản trị viên Django DoesNotExist tại/admin/
sau syncdb, kết quả là:
Creating tables ...
Installing custom SQL ...
Installing indexes ...
No fixtures found.
này có nghĩa là gì?
Dù sao, khi tôi truy cập vào bảng điều khiển trang web quản trị http://www.example.com/admin/, tôi nhận được tin nhắn này:
DoesNotExist at /admin/
Site matching query does not exist.
setting.py chứa:
INSTALLED_APPS = (
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.messages',
'django.contrib.staticfiles',
# Uncomment the next line to enable the admin:
'django.contrib.admin',
)
ur.py chứa:
from django.conf.urls.defaults import patterns, include, url
# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
# Examples:
# url(r'^$', 'rshd.views.home', name='home'),
# url(r'^rshd/', include('rshd.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)),
)
chỉ cần sử dụng 'từ nhập django.conf.urls.defaults *' và 'từ cài đặt nhập django.conf trong tệp' urls.py' của bạn và kiểm tra –
nhờ Harshith JV Nhưng không thay đổi bất kỳ điều gì –
bạn có thể thấy kết quả cho syncdb không chứa bảng tạo cho admin !!! –