[Answered ]-Django admin App

1👍

alas!I figured it out!
What you use is a Django Proxy Model
http://docs.djangoproject.com/en/1.1/topics/db/models/#id8

So I set up a Proxy model in my models.py file and then in admin.py I just used the proxy models as Admin.

👤Harry

1👍

have a short look to the second tutorial page of django. It describes the how to do that.

http://docs.djangoproject.com/en/1.1/intro/tutorial02/#intro-tutorial02

  1. You need to activate the admin site:
    1. Add “django.contrib.admin” to your INSTALLED_APPS setting.
    2. Run python manage.py syncdb.
    3. update urls.py

# Uncomment the next two lines to enable the admin:

from django.contrib import admin
admin.autodiscover()

add the next line to urlpatterns

    (r'^admin/', include(admin.site.urls)),

2 . You need to add your models to the admin interface

You only have to create a admin.py in your application directory (e.g. polls) and fill in the following content:

from mysite.polls.models import Poll, Quiz
from django.contrib import admin

admin.site.register(Poll)
admin.site.register(Quiz)

you have to change the first line of course to fit with your project name.

Hope this will help!

Leave a comment