Skip to content

Instantly share code, notes, and snippets.

@douglasmiranda
Forked from jleeothon/nolabelsuffix.py
Created August 29, 2024 00:06
Show Gist options
  • Save douglasmiranda/7359868613e57aa7b945d50c81c9eda2 to your computer and use it in GitHub Desktop.
Save douglasmiranda/7359868613e57aa7b945d50c81c9eda2 to your computer and use it in GitHub Desktop.
Change label suffix for Django forms
# 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