7👍
(From a comment by @mariodev)
You should be able to do:
self.fields['username'].widget.attrs.pop("autofocus", None)
to remove the item from the attrs
collection iff the specified item exists.
Source:stackexchange.com
7👍
(From a comment by @mariodev)
You should be able to do:
self.fields['username'].widget.attrs.pop("autofocus", None)
to remove the item from the attrs
collection iff the specified item exists.