0
votes

For some reason, when I add a new model and use Django South to sync the database by: /manage.py schemamigration myapp --auto and then the migrate line, I still can't see the model on the admin page. South does say that it added the model though.. so I'm not sure what's going on..

Any thoughts?

1
Did you register your app with the admin?Brandon

1 Answers

3
votes

Just because you created the model and synced it, does not mean it gets added to the admin page automatically. You must create an admin.py file in your app directory that contains

from django.contrib import admin
from .models import MyModel

admin.site.register(MyModel)

and make sure you have admin.site.autodiscover() in your main urls.py

This should all be covered in the tutorial pages for Django. Go back and RTM.