django - Adding custom attrs to a form widget -
i'm working forms in django, , need add custom attribute widgets, example:
widgets = { 'datefield': forms.widgets.dateinput(attrs = {'myownattr': 'foobar_value'}) }
is valid? , if it, how can access template? tried {{ field.myownattr }}
, doesn't return @ all.
Comments
Post a Comment