Forums

Django admin not showing models data

Hi,

I've installed Django 1.9 and created a project 'mysite' with an app 'myuploads': http://sylviapratox.pythonanywhere.com

For this project I'm using MySQL as database... in particular a model/database with one single table with two fields: id,filename

Everything is fine except for the fact that when i log to admin I can only see Users and Groups listed, but not data related to the model... (Note that I 've already done makemigrations and migrate for the model, and infact i can interact with the model/database from the Python shell with no problems...)

What I'm missing ? What should i try/check to make models data appear inthe Django admin ?

Tnx a lot in adavnce for any help tip

S.

Usually you need to make a change to a file called "admin.py" to register a new model into the admin. There's an example in the django tutorial

Thanks a lot Harry, it works !!!

S.

i have the same problem but the django tutorial page is removed

can anyone please help

Here is the tutorial for the most recent Django version: https://docs.djangoproject.com/en/4.0/intro/tutorial02/