Admin for language: from kyss.front.models import lang from django.contrib import admin class FrontAdmin(admin.ModelAdmin): fieldsets = [ ('General info', {'fields': ['name', 'short', 'locale', 'encoding', 'url', 'fdef', 'bdef']}), ('SEO stuff', {'fields': ['title', 'metadesc', 'metakeyw', 'websitename', 'websiteslogan']}), ]
admin.site.register(lang, FrontAdmin) Admin for poll and translations: from kyss.poll.models import Poll from kyss.poll.models import Question from kyss.poll.models import Choice from kyss.poll.models import Trans from kyss.front.models import lang from django.contrib import admin from django.contrib.contenttypes.models import ContentType from django.contrib.contenttypes import generic class QuestionInline(admin.TabularInline): model = Question extra = 2 class ChoiceInline(admin.TabularInline): model = Choice extra = 4 class TranslationInline(generic.GenericTabularInline): model = Trans extra = len(lang.objects.all()) class TransAdmin(admin.ModelAdmin): list_display = ['id', 'name'] class QuestionAdmin(admin.ModelAdmin): inlines = [ TranslationInline ] class ChoiceAdmin(admin.ModelAdmin): inlines = [ TranslationInline ] class PollAdmin(admin.ModelAdmin): fieldsets = [ ('Date information', {'fields': ['pub_date'], 'classes': ['collapse']}), ('Is this poll active', {'fields': ['active'] }), ] inlines = [ TranslationInline ] admin.site.register(Poll, PollAdmin) admin.site.register(Question, QuestionAdmin) admin.site.register(Choice, ChoiceAdmin) admin.site.register(Trans, TransAdmin) Models have not been changed. Alan. On Apr 12, 4:27 pm, matehat <mathieu.damo...@gmail.com> wrote: > Hi, > > can you show us the code for each of your admin classes? This probably > has something to do with some method overrides, but I can't say much > about the cause of your problem from the error message you gave... > > Cheers > > Mathieu --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---