There may be some other way to encapsulate code in your app, but the Mezzanine way is to use EXTRA_MODEL_FIELDS.
The Page admin automatically picks up additional fields if a models admin class doesn't specify it's own fields/fieldsets. Could you explain your last question a bit more? You could probably monkey patch the additional field onto the GalleryImageInline class. On Fri, Mar 21, 2014 at 12:19 PM, laperl <[email protected]> wrote: > > Hello, > > I am working in injecting fields in an existing model, It seems to work > but I have some questions: > > - Is it possible to encapsulate all the code inside de app, not using the > global settings.py EXTRA_MODEL_FIELDS? > > - I edited the settings.py and put the code inside EXTRA_MODEL_FIELDS, and > then I migrate the database. My surprise is that I refresh the admin page > and found the new field in the admin page without make the admin.py > unregister and register, and it seems to work. Do you know why? Wich > problems can I have if I don't do this? > > - I'm injecting a field in GalleryImage, this has a > TabularDynamicInlineAdmin property. Is it possible to change this without > rewriting the galleries/admin.py? > > Thank you very much for help me to understand this CMS > > -- > You received this message because you are subscribed to the Google Groups > "Mezzanine Users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Mezzanine Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
