Metadata-Version: 2.1
Name: django-enumchoicefield-fork
Version: 2.1.1
Summary: A choice field for Django using native Python Enums
Home-page: https://github.com/eivindkopperud/django-enumchoicefield-fork
Author: Tim Heap
Author-email: tim@timheap.me
License: BSD License
Platform: UNKNOWN
Classifier: Environment :: Web Environment
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Framework :: Django
Classifier: License :: OSI Approved :: BSD License
License-File: LICENSE

=================================
Django EnumChoiceField - The fork
=================================


A Django model field for native Python Enums.

Warning
=======
TL;DR - Think twice before using this package.
This is an ad hoc fork of the unmaintained `Django EnumChoiceField <https://pypi.org/project/django-enumchoicefield/>`_ that can be used by projects that are dependant on the said package.
For new projects (or projects that look for a better way to handle enums) you are strongly advised to check out the maintained `Django EnumFields <https://pypi.org/project/django-enumfields/>`_.

A quick how-to
==============
.. code:: python

    from enumchoicefield import ChoiceEnum, EnumChoiceField

    class Fruit(ChoiceEnum):
        apple = "Apple"
        banana = "Banana"
        orange = "Orange"

    class Profile(models.Model):
        name = models.CharField(max_length=100)
        favourite_fruit = EnumChoiceField(Fruit, default=Fruit.banana)

Documentation
=============

See `Django EnumChoiceField on ReadTheDocs <https://django-enumchoicefield.readthedocs.org/en/latest/>`_.

Testing
=======

To run the tests:

.. code:: sh

    $ virtualenv venv
    $ source venv/bin/activate
    $ pip install -r requirements-dev.txt
    $ tox


