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

Popular posts from this blog

ZeroMQ on Windows, with Qt Creator -

.net - Generate assembly with Roslyn -

batch file - filebot superstrict script: need tiny video sample or other solution -