[Answer]-Adding 2 models inside a Admin Manager

1👍

You are looking InlineModelAdmin models.

class ImageInline(admin.TabularInline):
    model = Image
    ...

class QuestionAdmin(admin.ModelAdmin):
    list_display = ('content', 'category', )
    list_filter = ('category',)
    fields = ('content', 'category', 'quiz', 'explanation')

    search_fields = ('content', 'explanation')
    filter_horizontal = ('quiz',)

    inlines = [AnswerInline, ImageInline]

https://docs.djangoproject.com/en/1.6/ref/contrib/admin/#inlinemodeladmin-objects

Good to see you are using Django Quiz app. I have recently added a lot of changes to it and it would be good if you could contribute anything to the repo:
https://github.com/tomwalker/django_quiz

Leave a comment