Skip to content

Commit

Permalink
cleaned up cms plugin a bit. thumbnail in text editor plugin works wi…
Browse files Browse the repository at this point in the history
…th current cms2
  • Loading branch information
Stefan Foulis committed May 28, 2009
1 parent 1ba9036 commit 9ccf52c
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions image_filer/cms_plugins.py
Expand Up @@ -3,22 +3,17 @@
from django.utils.translation import ugettext_lazy as _
from image_filer.models import ImagePublication
from cms.settings import CMS_MEDIA_URL
#from image_filer.forms import ImagePublicationForm

class ImagePlugin(CMSPluginBase):
model = ImagePublication
name = _("Image from Image Filer")
render_template = "image_filer/image.html"
text_enabled = True
#form = ImagePublicationForm
change_form_template = 'admin/image_filer/cms/image_plugin/change_form.html'
raw_id_fields = ('image',)

def render(self, context, instance, placeholder):
return {'image_publication':instance, 'placeholder':placeholder}

def icon_src(self, instance):
# TODO - possibly use 'instance' and provide a thumbnail image
return instance.image.admin_thumbnail()

return instance.image.get_admin_tiny_thumbnail_url()
plugin_pool.register_plugin(ImagePlugin)
File renamed without changes.

0 comments on commit 9ccf52c

Please sign in to comment.