1 2 3 4 5 6 7 | class LabeledHiddenInput(HiddenInput):
def render(self, name, value, attrs=None):
status = self.choices.queryset.get(pk = value)
h_input = super(LabeledHiddenInput, self).render( name, value, attrs=None)
return mark_safe("%s %s"%(status, h_input))
|
More like this
- Dynamically change a form select widget to a hidden widget by epicserve 3 years, 11 months ago
- Bootstrap button dropdown widget (replaces forms.Select) by benjaoming 10 months, 3 weeks ago
- ReST google-map directive. by mucius 1 month ago
- Template tag which gets specific GET variables from the current request by aruseni.magiku 3 years, 3 months ago
- Radio widget with labels after inputs by avsd 11 months, 2 weeks ago
Comments