django.forms TypedChoiceField Python Code Examples

TypedChoiceField (documentation), from the Django forms module, enables safe handling of pre-defined selections collected via an HTTP POST request from an HTML form submission.

TypedChoiceField can either be imported from django.forms or django.forms.fields. django.forms is more commonly used because it is less characters for the equivalent effect.

Example 1 from dmd-interpreter

dmd-interpreter (running web app) is a Python tool to aggregate clinically relevant information related to variants in the DMD gene and display that data to a user with a Django web application.

dmd-interpreter / interpreter / forms.py

Example 2 from django-angular

django-angular (project examples website) is a library with helper code to make it easier to use Angular as the front-end to Django projects. The code for django-angular is open source under the MIT license.

django-angular / djng / forms / fields.py

Example 3 from django-filter

django-filter (project documentation and PyPI page) makes it easier to filter down querysets from the Django ORM by providing common bits of boilerplate code. django-filter is provided as open source.

django-filter / django_filters / filters.py