On 9/9/07, Russell Keith-Magee <[EMAIL PROTECTED]> wrote: > > On 9/9/07, Joseph Kocherhans <[EMAIL PROTECTED]> wrote: > > > > If you use the newforms-admin branch and the edit inline > > functionality, you want to read this. > > > > I'm planning on breaking the current syntax for defining inlines in > > the very near future, but I figured I'd warn people and ask for > > comments first. Currently it's something like this: > > I don't have any partiular objections to the new syntax, but can you > give a quick rundown of why these changes are necessary? The only > reason that comes to my Sunday-addled brain at the moment is that it > would make 'inline within an inline' forms easier to write. Is this > the reason, or is there another that I'm missing?
I would guess one of the reasons is http://code.djangoproject.com/ticket/4491 > Also - how does this affet the proposal to merge the 'inlines' clause > into the 'fields' clause (and following your other proposal - the > 'fieldsets' clause)? Again, I can't see any reason why it shouldn't be > possible, but I wanted to make sure we weren't making a rod for our > own backs. I would like for the inlines to be separate, the reason is that in our system, we have quite a few generic stuff that can bind to any model and I would like to be able to register these generic models to any model's admin without the model's knowledge. Like this I could keep the basic model options simple and uphold the DRY principle. For example (I know it can be confusing, like my explanations ;) ): class Article( models.Model ): ... some_fields_go_here ... class ArticleOptions( admin.ModelAdmin ): ... some_basic_options ... ---- class CommentOptions( models.Model ): enabled = models.Fireld() moderators = models.Field() ... for model, model_options in admin.site._registry.items(): if i_like_model( model ): model_options.inlines.append( CommentOptionsInline ) this would probably still be possible using the fields/fieldsets property, but this seems cleaner... > > Yours, > Russ Magee %-) > > > > -- Honza Kr�l E-Mail: [EMAIL PROTECTED] ICQ#: 107471613 Phone: +420 606 678585 --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---