-
-
Save douglasmiranda/7359868613e57aa7b945d50c81c9eda2 to your computer and use it in GitHub Desktop.
Change label suffix for Django forms
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# have all your forms extend this mixin | |
class NoLabelSuffixMixin: | |
def __init__(self, *args, **kwargs): | |
if 'label_suffix' not in kwargs: | |
kwargs['label_suffix'] = '' | |
super(NoLabelSuffixMixin, self).__init__(*args, **kwargs) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment