Example #1
0
    def render(self, form, form_style, context):
        extra_field = self.extra_field.render(form, form_style, context)

        ctx = { 'extra_field': extra_field, }
        return build_and_render_field(self.field, form, form_style, context,
                                      template=self.template,
                                      attrs=self.main_field.attrs,
                                      extra_context=ctx)

        return render_to_string(self.template, Context(ctx))
Example #2
0
 def render(self, form, form_style, context):
     ctx = {'prepend': self.prepend}
     return build_and_render_field(self.field, form, form_style, context,
             template=self.template, attrs=self.attrs, extra_context=ctx)