开发者

Django admin site only autodetecting one app's models

I've got a django 1.2.5 site with several apps.

Bizarrely the admin site is only autodetecting the admin models for one app. I guess this could be caused by something raising an exception somewhere, but I can't find if this is happening. It seems that the admin.py file isn't even being loaded for the app that's missing.

开发者_Python百科

Has anyone any idea how I can track down why it's not working? I should add that the admin models both used to be present, but I can't remember how long ago and what I've changed since then :-(


Try importing your_app.admin for your missing app from the django shell. That should show you the traceback of any Exception that's raised.

[you@host]$ python manage.py shell
>>> from your_app import admin

If that doesn't show anything, do check that django.contrib.admin.site.register has actually been called for your model.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜