Skip to content
New issue

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

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Saner defaults for plugins #1474

Merged
merged 2 commits into from Oct 11, 2012
Merged

Conversation

ojii
Copy link
Contributor

@ojii ojii commented Oct 11, 2012

  • Fixes Simpler CMS Plugins #1373.
  • The default name for plugins is now nicer.
  • The render method of plugins now by default adds.
    the instance and placeholder to the context and
    returns it, eliminating the need to overwrite this
    method in simple plugins.
  • By default, admin_preview is now False, as it's often useless.

* Fixes django-cms#1373.
* The default name for plugins is now nicer.
* The render method of plugins now by default adds.
  the instance and placeholder to the context and
  returns it, eliminating the need to overwrite this
  method in simple plugins.
@digi604
Copy link
Contributor

digi604 commented Oct 11, 2012

lgtm

@@ -83,7 +83,7 @@ class CMSPluginBase(admin.ModelAdmin):
form = None
change_form_template = "admin/cms/page/plugin_change_form.html"
# Should the plugin be rendered in the admin?
admin_preview = True
admin_preview = False
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

awesome!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

haha I thought this might be mildly controversial, but that reaction is even better :D

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

most plugins end up as unstyled garbage in the admin preview anyway, especially the more involved ones.

@evildmp
Copy link
Contributor

evildmp commented Oct 11, 2012

Very nice. And sane.

beniwohli added a commit that referenced this pull request Oct 11, 2012
@beniwohli beniwohli merged commit f2f44b0 into django-cms:develop Oct 11, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Simpler CMS Plugins
4 participants