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.
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
- You need to activate the admin site:
- Add “django.contrib.admin” to your INSTALLED_APPS setting.
- Run python manage.py syncdb.
- 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!
- [Answered ]-Method to create a model instance based on a request object
- [Answered ]-Changing the way tags in django-taggit are input
- [Answered ]-Django: how do I render an XML file, then use that xml in a simultaneously rendered view?
- [Answered ]-Clicking the reset radio button tries to submit the form in Django
Source:stackexchange.com