- def render(self, name, value, attrs=None, choices=()):
- output = [super(OrderedSelectMultiple, self).render(name, value, attrs)]
- choices = [(unicode(obj), obj.pk) for obj in models.Sponsor.objects.all()]
- choices_js = ', '.join('{name: "%s", id: %d}' % choice for choice in choices)
+ def render(self, name, value, attrs=None):
+ output = [super(SponsorPageWidget, self).render(name, value, attrs)]
+ sponsors = [(unicode(obj), obj.pk, obj.logo.url) for obj in models.Sponsor.objects.all()]
+ sponsors_js = ', '.join('{name: "%s", id: %d, image: "%s"}' % sponsor for sponsor in sponsors)