#5476: Image thumbnails on image fields in the admin
----------------------------------------------+-----------------------------
Reporter: [EMAIL PROTECTED] | Owner: xian
Status: new | Milestone:
Component: Admin interface | Version: newforms-admin
Resolution: | Keywords: nfa-someday
admin, thumbnails imagefields
Stage: Design decision needed | Has_patch: 0
Needs_docs: 0 | Needs_tests: 0
Needs_better_patch: 0 |
----------------------------------------------+-----------------------------
Comment (by vitja):
Hi!
I've recently attached patch, that shows image on admin page:
{{{
image = models.ImageField(admin_preview=True)
}}}
I'm going to create generic way of creating thumbnails, so could you give
me a tip.
I think that should be field, e.g.
{{{
image_thumb = ImageThumbField(thumb_for='image',
thumbnalizer=create_100x100_thumb)
}}}
so adding thumbs to list_view will be as easy as:
{{{
def get_thumb(self):
return '<img src="%s" />' % self.get_thumb_url
get_thumbs.allow_tags=True
}}}
or even:
{{{
@image_tag_for('thumb')
def get_thumb():
pass
}}}
--
Ticket URL: <http://code.djangoproject.com/ticket/5476#comment:8>
Django Code <http://code.djangoproject.com/>
The web framework for perfectionists with deadlines
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---