newforms

Add class to Django label_tag() output

Add class to Django label_tag() output Question: I need some way to add a class attribute to the output of the label_tag() method for a forms field. I see that there is the ability to pass in an attrs dictionary and I have tested it in the shell and I can do something like: for …

Total answers: 10