django-polymorphic/polymorphic
Diederik van der Boor 5d65bf4bbc Added polymorphic admin interface
Extracted from django-fluent-pages, ready for other apps too.
The polymorphic admin is implemented via a parent admin for the base
model, and separate admin interfaces for the child models.

The parent model needs to inherit PolymorphicParentModelAdmin,
and override `get_admin_for_model()` and `get_child_model_classes()`
to find the child admin interfaces.

The derived models have their own `ModelAdmin` class, which inherits
from `PolymorphicChildModelAdmin`. The parent admin redirects it's
change and delete views to the child admin.

By adding `polymorphic` to the INSTALLED_APPS, the breadcrumbs will be
fixed as well, to remain unchanged between the child applications.
2012-07-05 23:16:46 +02:00
..
management polymorphic_dumpdata management command functionality removed; 2010-10-20 09:31:42 +02:00
templates/admin/polymorphic Added polymorphic admin interface 2012-07-05 23:16:46 +02:00
templatetags Added polymorphic admin interface 2012-07-05 23:16:46 +02:00
__init__.py PEP 8 cleaning 2011-12-20 18:59:50 +00:00
admin.py Added polymorphic admin interface 2012-07-05 23:16:46 +02:00
base.py PEP 8 cleaning 2011-12-20 18:59:50 +00:00
compatibility_tools.py PEP 8 cleaning 2011-12-20 18:59:50 +00:00
manager.py Explicit is better than implicit 2012-01-09 16:47:59 +01:00
models.py IMPORTANT: import path changed, it's now: "from polymorphic import PolymorphicModel, ..." 2010-02-22 16:16:00 +01:00
polymorphic_model.py PEP 8 cleaning 2011-12-20 18:59:50 +00:00
query.py PEP 8 cleaning 2011-12-20 18:59:50 +00:00
query_translate.py PEP 8 cleaning 2011-12-20 18:59:50 +00:00
showfields.py PEP 8 cleaning 2011-12-20 18:59:50 +00:00
tests.py Fixed github issue 15 (query result incomplete with inheritance). Thanks to John Debs. 2011-01-24 17:03:23 +01:00
tools_for_tests.py PEP 8 cleaning 2011-12-20 18:59:50 +00:00