app/model not showing in admin interface?

2,280 views
Skip to first unread message

Mark J. Nenadov

unread,
Mar 13, 2011, 4:26:33 PM3/13/11
to Django users
Hello folks! I'm trying to get some of my apps/models to display in
mysite:8000/admin/ and am not having any luck.

I have my app's admin.py setup like so:

>> from app.models import Task
>> from django.contrib import admin
>>
>> admin.site.register(App)

django.contrib.admin is enabled in my INSTALLED_APPS. And, I've taken
care to restart my development Django instance since I made these
changes.

"App" (just an example for the purposes of this e-mail) is not showing
up in the admin interface.

I'm sort of at a loss as to what to look for or try next.

Any help is appreciated!

Thanks,
~Mark



Mark J. Nenadov

unread,
Mar 13, 2011, 4:37:05 PM3/13/11
to Django users
Sorry, that code from admin.py should read:

>> from app.models import Task
>> from django.contrib import admin

>> admin.site.register(Task)

~Mark

shofty

unread,
Mar 14, 2011, 3:14:09 AM3/14/11
to Django users
stop/start the dev server. It doesn't spot new files being created,
only changes to existing files.
S

Kenneth Gonsalves

unread,
Mar 14, 2011, 3:18:11 AM3/14/11
to django...@googlegroups.com
On Mon, 2011-03-14 at 00:14 -0700, shofty wrote:
> stop/start the dev server. It doesn't spot new files being created,
> only changes to existing files.

are you sure?
--
regards
KG
http://lawgon.livejournal.com
Coimbatore LUG rox
http://ilugcbe.techstud.org/

shofty

unread,
Mar 14, 2011, 10:47:42 AM3/14/11
to Django users
100%

documented here.

http://docs.djangoproject.com/en/dev/intro/tutorial02/#make-the-poll-app-modifiable-in-the-admin

easy enough to test, new app, new admin.py, refresh the admin, not
there.
stop/start, it;ll be there.

caught me out more than once til i properly read the tut.

Matt
Reply all
Reply to author
Forward
0 new messages