Login

Tag "edit-inline"

Snippet List

EditInline for GenericForiegnKey II

This is an update to [snippet 765](http://www.djangosnippets.org/snippets/765/) as I was having trouble getting it to work on branches/newforms-admin @ r7771. There are just a few minor changes to the previous snippet, all simple stuff. I went ahead an added can_delete and can_order options that the previous snippet didn't include. [More details in blog post](http://paltman.com/2008/06/29/edit-inline-support-for-generic-relations/).

  • admin
  • foreignkey
  • generic
  • edit-inline
Read More

EditInline for GenericForeignKey

A simple InlineModelAdmin class that enables you to edit models that are bound by the instance via a generic foreign key (`content_type`, `object_id` pair) Use like: class PlacementInlineOptions( generic.GenericTabularInline ): model = Placement extra = 2 ct_field_name = 'target_ct' id_field_name = 'target_id' Can be also found at #4667

  • admin
  • foreignkey
  • generic
  • edit-inline
Read More

2 snippets posted so far.