#choicefield

[ follow ]
fromdjangosnippets.org
1 week ago
Django

Form field with fixed value

Create a custom Django ChoiceField subclass that enforces a single allowed value by setting choices to [(value, value)] in __init__.
[ Load more ]