Django admin not showing models

Double check your permissions - that is: if you think your user is a superuser, just go look to make sure! If your user is not a superuser, look in your "Authentication and Authorization" › "Users" under the user you are logged in as and see if the "User permissions:" include the models for the application in question.

After chasing this for longer than I care to admit, I realized my user was not actually a superuser. As you will see on many of the related posts, it is easy for an application to not show in Admin if the user does not have the correct permissions, such as here: enter image description here

As you can see from this, user 2 does not have the required permissions on the "done" app's models - only on the "timekeeping" app's models.

I was fairly certain this was a superuser (but it's not). I figure either I must have reduced my permissions to troubleshoot an issue another user had been seeing or to give a more representative experience using the system.

PS A giveaway for this being the issue is that any clean database where you use the python manage.py createsuperuser to get going will show all of your registered apps/models whereas an existing database (where permissions may be more nuanced) will show only some of your registered apps/models.


Make sure you are calling:

admin.site.register(<model-name>)

and not

admin.register(<model-name>)

This was the cause for me.


Check that you have admin.autodiscover() in urls.py.


Did you run syncdb after changing your models.py file?

Go to the base directory of your project (where manage.py is) and run

python manage.py syncdb

Edit: Since you already tried this, add a str or unicode method to your class like this:

class Resource(models.Model):

    title = models.CharField(max_length=128, blank=True)

    def __str__(self): # __str__ for Python 3, __unicode__ for Python 2
        return self.name

Edit 2: Funnily enough, I ran into the exact same issue today working on my own projects. If the str code above still doesn't work for you, double check that you've actually registered your models in admin.py:

from MyApp.models import MyModel
admin.site.register(MyModel)

Edit 3: Finally, make sure your admin.py file with the above code is actually inside the directory of the app in question (i.e. the same directory with your models.py that defines MyModel).