Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
  • 7 commits
  • 3 files changed
  • 0 commit comments
  • 2 contributors
Commits on Mar 16, 2012
@sadig sadig Enabled plugin to show up in text editor
Added pygments icon

modified:   cms_plugins.py
new file:   images/icon.png
c64f6ac
@sadig sadig Adjusted MANIFESTS.in to install images 7f0edaf
@sadig sadig Fixed syntax 64f888a
@sadig sadig Forgot django.settings import
Fixed syntax error in icon_src
d9ed9f8
@sadig sadig Renamed icon-png to pygments.png 8099ecc
Commits on Mar 18, 2012
@sadig sadig Moved images/pygments.png to static/cmsplugin-pygements/pygment.png
Removed images directory and contents
d397eb6
@fivethreeo Merge pull request #4 from sadig/master
Enabling pygments cms plugin to show up in text edit
ec69f12
View
1  MANIFEST.in
@@ -1 +1,2 @@
recursive-include cmsplugin_pygments/templates *
+recursive-include cmsplugin_pygments/images *
View
7 cmsplugin_pygments/cms_plugins.py
@@ -8,10 +8,14 @@
from cms.plugin_pool import plugin_pool
from models import PygmentsPlugin
+from django.conf import settings
+
+
class CMSPygmentsPlugin(CMSPluginBase):
model = PygmentsPlugin
name = _("Pygments")
render_template = "cmsplugin_pygments/pygments.html"
+ text_enabled=True
def render(self, context, instance, placeholder):
style = styles.get_style_by_name(instance.style)
@@ -25,4 +29,7 @@ def render(self, context, instance, placeholder):
'placeholder':placeholder})
return context
+ def icon_src(self, instance):
+ return settings.STATIC_URL + u"cmsplugin-pygments/pygments.png"
+
plugin_pool.register_plugin(CMSPygmentsPlugin)
View
BIN  cmsplugin_pygments/static/cmsplugin-pygments/pygments.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

No commit comments for this range

Something went wrong with that request. Please try again.