Apps won't show in Django admin

Do you have your apps in the INSTALLED_APPS section in settings.py? Make sure it has your apps listed there. My section reads

INSTALLED_APPS = (
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.admin',
'django.contrib.sites',
'squick.items',
'cowsite.search',
'cowsite.posts',

)

for instance. I'm pretty sure for security, they won't show up in the admin unless they are in installed apps. I think I had this same issue, where I couldn't get cowsite to show up in the admin.

The Django docs say about the admin page: "By default, it displays all the apps in INSTALLED_APPS that have been registered with the admin application, in alphabetical order"


Are you logging in to admin as a superuser? If not, it could be a permissions problem.


By coincidence I had the same problem this morning. Briefly, this is what worked for me (see references for details):

In the top level directory of MyApp (ie same directory as models.py, etc.) I added a python module admin.py, containing:

from models import ThisModel, ThatModel
from django.contrib import admin

admin.site.register(ThisModel)
admin.site.register(ThatModel)

Then in mysite directory I did syncdb and runserver, and ThisModel and ThatModel were in the admin interface.

Does that work for you?

Best wishes

Ivan

** References

(I am a new member so I am allowed to post one hyperlink only!)

Django tutorial: Make the poll app modifiable in the admin

There was also a query on the Pinax google group recently titled, "How to add my app to Admin in a Pinax project?"