Open jab3z opened 7 years ago
Could you please clear your cache browser and try again_ If that doesn't fix this for you, please try to provide a minimal example that is able to reproduce this issue. Which browser are you using?
For sure it's not cache 😅
Docs examples here.
models.py
from polymorphic.models import PolymorphicModel
class ParentModel(PolymorphicModel):
name = models.CharField(_("Name"), max_length=24)
class ChildModel(ParentModel):
pass
admin.py
from polymorphic.admin import (PolymorphicParentModelAdmin,
PolymorphicChildModelAdmin, GatewayPolymorphicChildModelFilter)
@admin.register(ChildModel)
class ChildModelAdmin(PolymorphicChildModelAdmin):
base_model = ParentModel
@admin.register(ParentModel):
class ParentModelAdmin(PolymorphicParentModelAdmin):
base_model = ParentModel
child_models = [ChildModel]
show_in_index
is False by default.
Please come to the django-jet Discord server so we can organize if you like:
Welcome! 😄
Hi,
Polymorphic it's using the same admin urls/views for base models and children models. Check docs here. While the index page doesn't show children models, if a detail of an object it's browsed, links to children models are displayed on the menu, even the links return 404, because they are not registered in admin.
Index page menu:
Detail page of an ordinary common object:
Cheers!