Last active
July 19, 2018 17:55
-
-
Save walison17/fd8ad0081e7650f45bc97eae8d537e44 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
class PlanForm(forms.ModelForm): | |
class Meta: | |
model = Plan | |
fields = ("price", "title", "description") | |
def __init__(self, *args, **kwargs): | |
super().__init__(self, *args, **kwargs) | |
self.fields["price"].localize = True | |
# settings.py | |
USE_L10N = True | |
DECIMAL_SEPARATOR = ',' | |
NUMBER_GROUPING = 3 | |
USE_THOUSAND_SEPARATOR = True | |
THOUSAND_SEPARATOR = '.' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment