Playing a little around with Polymorphic and additional plugins I'm wondering how I can prevent some of the base class fields from being showed inside form for child admin interface. Having this adminy.py for my child class:
from django.contrib import admin
from .models import *
from partsmanagement.models import Part
from polymorphic.admin import PolymorphicParentModelAdmin, PolymorphicChildModelAdmin
admin.site.register(Book)
class BookAdmin(PolymorphicChildModelAdmin):
base_model = Part
and this admin.py for the base model:
# -*- coding: utf-8 -*-
from django.contrib import admin
from .models import *
from polymorphic.admin import PolymorphicParentModelAdmin, PolymorphicChildModelAdmin
from bookcollection.models import Book
from bookcollection.admin import BookAdmin
admin.site.register(Part)
class PartAdmin(PolymorphicParentModelAdmin):
base_model = 'Part'
child_models = (
(Book, BookAdmin),
)
Now the form inside admin shows all fileds of base and child class. I tried to add exclude = list() for child class but this didn't work (no change).