How to Order ManyToManField Inline Reverse Relastionships in the Django Admin

2010-11-12 Thread jough
I'm using Django 1.2's new ManyToMany admin.TabularInline to display related objects in the admin app, and it works great except I can't figure out what to set the "ordering" property to so it can sort by one of the cross-referenced field names. For instance: class Foo(models.Model):

Add Content from a Custom View to the Django Admin Change Form

2010-11-28 Thread jough
I'd like to add a derived field to a default ModelAdmin.fieldsets like I would by specifying a method and adding it to the ModelAdmin.list_display property, but there doesn't seem to be an easy way to do that (if there is ANY way to do that). The default Django Admin list view seems to have a lot

Save M2M "Through" Fields on ModelAdmin or ModelForm Save

2011-05-03 Thread jough
Apparently Django's ModelAdmin/ModelForm doesn't allow you to use save_m2m() if there's an intermediate through table for a ManyToManyField. If I have a model such as: class MyModel(models.Model): created = models.DateTimeField() many = models.ManyToManyField("RelatedModel", t