Beispiel #1
0
 def render(self, context, instance, placeholder):
     if instance.url:
         link = settings.dbgettext(instance.url)
     elif instance.page_link:
         link = instance.page_link.get_absolute_url()
     else:
         link = ""
     instance.alt = settings.dbgettext(instance.alt)
     context.update({"picture": instance, "link": link, "placeholder": placeholder})
     return context
 def render(self, context, instance, placeholder):
     if instance.url:
         link = settings.dbgettext(instance.url)
     elif instance.page_link:
         link = instance.page_link.get_absolute_url()
     else:
         link = ""
     instance.alt = settings.dbgettext(instance.alt)
     context.update({
         'picture': instance,
         'link': link,
         'placeholder': placeholder
     })
     return context
Beispiel #3
0
 def render(self, context, instance, placeholder):
     if instance.mailto:
         link = u"mailto:%s" % settings.dbgettext(instance.mailto)
     elif instance.url:
         link = settings.dbgettext(instance.url)
     elif instance.page_link:
         link = instance.page_link.get_absolute_url()
     else:
         link = ""
     context.update({
         'name':settings.dbgettext(instance.name),
         'link':link, 
         'placeholder':placeholder,
         'object':instance
     })
     return context
Beispiel #4
0
 def render(self, context, instance, placeholder):
     instance.alt = settings.dbgettext(instance.alt)
     context.update({
         'picture':instance,
         'placeholder':placeholder
     })
     return context 
Beispiel #5
0
 def render(self, context, instance, placeholder):  
     instance.title = settings.dbgettext(instance.title)
     context.update({
         'object':instance, 
         'placeholder':placeholder
     })    
     return context
Beispiel #6
0
 def render(self, context, instance, placeholder):
     if instance.mailto:
         link = u"mailto:%s" % settings.dbgettext(instance.mailto)
     elif instance.url:
         link = settings.dbgettext(instance.url)
     elif instance.page_link:
         link = instance.page_link.get_absolute_url()
     else:
         link = ""
     context.update({
         'name': settings.dbgettext(instance.name),
         'link': link,
         'placeholder': placeholder,
         'object': instance
     })
     return context
 def render(self, context, instance, placeholder):
     if instance.mailto:
         link = u"mailto:%s" % settings.dbgettext(instance.mailto)
     elif instance.url:
         # import pdb;pdb.set_trace()
         if instance.url[:8] == "reverse:":
             name = instance.url[8:].strip()
             link = reverse(name)
         else:
             link = settings.dbgettext(instance.url)
     elif instance.page_link:
         link = instance.page_link.get_absolute_url()
     else:
         link = ""
     context.update(
         {"name": settings.dbgettext(instance.name), "link": link, "placeholder": placeholder, "object": instance}
     )
     return context
Beispiel #8
0
 def render(self, context, instance, placeholder):
     instance.title = settings.dbgettext(instance.title)
     context.update({'object': instance, 'placeholder': placeholder})
     return context