#custom-field

[ follow ]
fromdjangosnippets.org
4 hours 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 ]