Commit Graph

9 Commits (4dc20a021342b57f16884f4e951056be5cade8d8)

Author SHA1 Message Date
Diederik van der Boor 83cb059317 Fix marking a new formset item as empty-form on postback errors 2016-08-15 16:03:08 +02:00
Diederik van der Boor 60db4f63b9 Update polymorphic inline script.
Now based on standard Django script.
This makes upgrading it to newer Django versions much easier.
Changes for polymorphic are included in this commit
2016-08-10 11:45:48 +02:00
Diederik van der Boor 7330a4f099 Add preliminairy working JavaScript to render polymorphic inlines 2016-08-09 01:20:40 +02:00
Diederik van der Boor ccda52d91e Fixed the breadcrumb of the object_history template.
NOTE: this could conflict with projects that use django-reversion,
if the `VersionAdmin` is the last in the inheritance chain.
2016-02-18 18:17:08 +01:00
Bertrand Bordage 2421f10ab5 Simplifies the two remaining templates (for grappelli support). 2013-07-18 16:38:14 +02:00
Bertrand Bordage 40eeb15fad Simplifies add_type_form.html. See #38. 2013-06-07 13:39:33 +02:00
Diederik van der Boor 720a189f5a Remove unused load statements in add_type_form.html
This addresses Django 1.5 compatibility as well (see #16)
2013-03-18 12:15:10 +01:00
Diederik van der Boor b2e308d30c Improve PolymorphicParentAdmin, simplify, fix templates
During the development of django-polymorphic-tree it was discovered that
the PolymorphicParentModelAdmin could actually be made much simpler.
It features a `child_models` attribute now, so there is very little code
needed to actually implement a polymorphic admin now.

Also found various issues which are together fixed in this commit for
pulling.
2012-07-13 16:01:58 +02:00
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