On 5/10/07, Joseph Kocherhans <[EMAIL PROTECTED]> wrote: > On 5/5/07, Jari Pennanen <[EMAIL PROTECTED]> wrote: > > > > Modularity of edit inline? Any better? > > > > Currently: > > models.ForeignKey(Other, edit_inline=models.TABULAR, parameters...) > > obiviously is a big waste of OO abilities, > > > > instead something like, the OO way: > > models.ForeignKey(Other, edit_inline=models.TabularInline(parameters)) > > were much better. (I know it is defined elsewhere in upcoming > > implementation, but the example I saw did not implement subclassing > > which I think is neccessity to create it customizable, and also the > > parameters is way more clear this way) > > > > One could implement own edit inlines just by subclassing from > > TabularInline/StackedInline, or from where TabularInline subclassed > > itself. Currently I see no easy or sensible way to create own edit > > inlines. > > That's the general idea of what we came up with at PyCon. I'm still > working on the underlying machinery (basically formset_for_model and > formset_for_instances) though. TabularInline/StackedInline (or > whatever they end up being) will be mostly configuration, however, > they are an incredibly small part of the overall implementation and > will be one of the last things I work on. I imagine they will have > some methods to customize them a little via subclassing, but I'm not > going to speculate further until I get there.
Oops. Actually let me clarify that a bit. The edit_inline definition will definitely *not* be an argument to ForeignKey, but rather an argument to either AdminSite.register or ModelAdmin (most likely the latter). Passing configuration data into ModelAdmin still hasn't been finalized, so I can't really tell you exactly what it will look like, but the main point is that edit_inline definitions will happen completely *outside* of the model. Joseph --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-developers?hl=en -~----------~----~----~----~------~----~------~--~---