Provide a subclass of BooleanField that handles the Yes/No use case.
The full documentation is at https://django-yesnofield.readthedocs.io.
Install yesnofield:
pip install django-yesnofield
Add it to your INSTALLED_APPS:
INSTALLED_APPS = (
...
'django_yesnofield.apps.YesNoFieldConfig',
...
)
Add yesnofield's URL patterns:
from django_yesnofield import urls as django_yesnofield_urls
urlpatterns = [
...
url(r'^', include(django_yesnofield_urls)),
...
]
- TODO
Does the code actually work?
source <YOURVIRTUALENV>/bin/activate (myenv) $ pip install tox (myenv) $ tox
Tools used in rendering this package: