On 6/20/19 7:12 AM, Christian González wrote:
What I need for a good plugin life cycle are methods, callbacks that are called when a plugin is "installed" = run the first time, methods for enabling/disabling etc.
>
The easiest way would be implementing these methods within the AppConfig subclass.

I asked myself why is there a PluginMeta needed? Can't I add those data attributes directly to AppConfig?

So my question on you all is: Is it a good idea to merge those data deeply with tha AppConfig object? I mean, as a plugin in my sense is more or less the same as an app, it won't matter. But deeply inside, I feel that there is something wrong done. Separate concerns should not me mixed - and I don't know what you want to implement in Django's future into AppConfig. Maybe there could be conflicts.

Another way would be implementing the methods too into the PluginMeta object.

May I ask for your opinions here?

I would likely keep this interface isolated from the app config, to prevent future name clashes.

And a second question: The DJango docs say, that it's not recommended to use "default_app_config". But in each and every example, even in the tutorials and the Django boilerplate code of "./manage.py startproject foo" are NO Appconfigs addressed in INSTALLED_APPS. Nobody does this, right?

How "obligate" is this recommendation, when noone uses it? Should this be kept?

I think it's most likely there as a legacy state, in order to reduce the burden of upgrading.

I do agree it would be better if we abide by our own recommendations.

--
Curtis

--
You received this message because you are subscribed to the Google Groups "Django 
developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/2c62e976-0b33-b515-f2af-390a551d1b18%40tinbrain.net.
For more options, visit https://groups.google.com/d/optout.

Reply via email to