开发者

django 1.3 admin site problem itself

开发者 https://www.devze.com 2023-03-03 13:37 出处:网络
I have got a really strange issue with the admin site. When I enter to the site the address is:http://127.0.0.1:8000/admin/ and I see the front-admin-site, hmm looks fine. But when I click to any \"+A

I have got a really strange issue with the admin site. When I enter to the site the address is:http://127.0.0.1:8000/admin/ and I see the front-admin-site, hmm looks fine. But when I click to any "+Add button" or any link on the site I see still the admin site:p but with address f.e. http://127.0.0.1:8000/admin/category/category/add/ . I can play as many times as I want, I see all the time the front-admin-site with a list of my models but with address f.e. http://127.0.0.1:8000/admin/catego开发者_如何学Pythonry/category/add/category/category/add/category/category/add/category/category/add/ :pp

What is wrong? Best regards,

nykon


It's a problem with your urls.py configuration, the way to have admin in there is:

from django.contrib import admin
admin.autodiscover()

...

    url(r'^admin/', include(admin.site.urls)),

99% of the time that's what that is.

0

精彩评论

暂无评论...
验证码 换一张
取 消