Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Save plugin_type with full import path #462

Open
stefanfoulis opened this Issue May 10, 2010 · 8 comments

Comments

Projects
None yet
7 participants
Owner

stefanfoulis commented May 10, 2010

CMSPlugin should save the full import path to identify a plugin instead of only the class name. This would prevent name clashes with more common names.

CMSPlugin.plugin_type:
current: "TopOffersPlugin"
proposed: "myapp.cms_plugins.TopOffersPlugin" (or maybe just "myapp.TopOffersPlugin")

Collaborator

ojii commented May 14, 2010

I prefer the myapp.PluginName approach. I think this is something for 2.2

Contributor

yakky commented Jul 15, 2013

I guess by now the migration would be very painful...
Is this still on the wishlist?

@digi604 digi604 modified the milestones: 3.X, Some Day Feb 10, 2014

Owner

stefanfoulis commented Jun 6, 2014

update: a name clash also happens at django level with the automatic reverse relation from the plugin base-class to the subclasses. So it is not so simple.

Owner

FinalAngel commented Oct 19, 2015

@stefanfoulis is this still relevant as of #3204?

@FinalAngel FinalAngel modified the milestones: Clean up issues & pull request, 3.X Oct 19, 2015

Owner

stefanfoulis commented Dec 4, 2015

yes. The problem still remains.

Owner

stefanfoulis commented Feb 25, 2016

Changing this should be relatively simple. A database migration can update all the existing entries. It is very internal, so the vast majority of 3rd party apps should not be affected.

Anticipated problems:

  • existing fixtures
  • importer/exporter tools
  • ...
Owner

czpython commented Mar 17, 2016

@stefanfoulis apps like django-reversion would break and force users to recreate their revision history (that or update all json strings).

Owner

stefanfoulis commented Mar 17, 2016

@czpython at least for django-reversion, we could update the reversion history table in the migrations as well. And we can implement it in a way that the old format still works and will be updated on next save. That would also take care of existing fixtures being loaded in.

@mkoistinen mkoistinen modified the milestones: 3.3.1, 3.3.0.RC1 May 16, 2016

@czpython czpython modified the milestones: 3.5, 3.3.1 Jul 8, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment