Hi all,

On 9 sep 2007, 14:36, "Honza Král" <[EMAIL PROTECTED]> wrote an
example newforms-admin snippet that would programmatically add an
inline:

> 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 does not work with the current revision of the newforms-admin
branch. I think it ends up adding the inlines to the
django.contrib.sites.models.SiteAdmin class, but I don't really
understand the code here.

Is there a way to extend the inlines list after the class has been
defined?


Regards,

Joost

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to