'type' object is not iterable in using django_enums
<p>I tried to use <a href="https://pypi.python.org/pypi/django-enums/" rel="nofollow">django_enums</a> and got an error with <strong>list(cls)</strong> when making migrations:</p>

<pre><code>(venv:SFS)rita@rita-notebook:~/Serpentarium/ServiceForServices/project/serviceforservices$ python manage.py makemigrations
    Traceback (most recent call last):
  File "manage.py", line 22, in &lt;module&gt;
    execute_from_command_line(sys.argv)
  File "/home/rita/Serpentarium/ServiceForServices/venv/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 367, in execute_from_command_line
    utility.execute()
  File "/home/rita/Serpentarium/ServiceForServices/venv/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 341, in execute
    django.setup()
  File "/home/rita/Serpentarium/ServiceForServices/venv/local/lib/python2.7/site-packages/django/__init__.py", line 27, in setup
    apps.populate(settings.INSTALLED_APPS)
  File "/home/rita/Serpentarium/ServiceForServices/venv/local/lib/python2.7/site-packages/django/apps/registry.py", line 108, in populate
    app_config.import_models(all_models)
  File "/home/rita/Serpentarium/ServiceForServices/venv/local/lib/python2.7/site-packages/django/apps/config.py", line 199, in import_models
    self.models_module = import_module(models_module_name)
  File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
    __import__(name)
  File "/home/rita/Serpentarium/ServiceForServices/project/serviceforservices/service/models.py", line 84, in &lt;module&gt;
    class EmployeesStatus(models.Model):
  File "/home/rita/Serpentarium/ServiceForServices/project/serviceforservices/service/models.py", line 86, in EmployeesStatus
    status = enum.EnumField(StatusEnum, default=StatusEnum.AT)
  File "/home/rita/Serpentarium/ServiceForServices/venv/local/lib/python2.7/site-packages/django_enums/enum.py", line 53, in __init__
    kwargs['max_length'] = self.enum.get_max_length()
  File "/home/rita/Serpentarium/ServiceForServices/venv/local/lib/python2.7/site-packages/django_enums/enum.py", line 39, in get_max_length
    return len(max(list(cls), key=(lambda x: len(x.key))).key)
TypeError: 'type' object is not iterable
</code></pre>

<p>I installed django-enums, enum and six:</p>

<pre><code>(venv:SFS)rita@rita-notebook:~/Serpentarium/ServiceForServices/project/serviceforservices$ pip install django-enums
(venv:SFS)rita@rita-notebook:~/Serpentarium/ServiceForServices/project/serviceforservices$ pip install enum
(venv:SFS)rita@rita-notebook:~/Serpentarium/ServiceForServices/project/serviceforservices$ pip install six
</code></pre>

<p>Using in Models.py:</p>

<pre><code>...
from django_enums import enum

...
class StatusEnum(enum.Enum):
__order__ = 'AT BT BC AC'  # for python 2

AT = (u'ÐÐ', u'ÐÐºÑÐ¸Ð²ÐµÐ½ Ð²ÑÐµÐ¼ÐµÐ½Ð½Ð¾')
BT = (u'ÐÐ', u'ÐÐ»Ð¾ÐºÐ¸ÑÐ¾Ð²Ð°Ð½ Ð²ÑÐµÐ¼ÐµÐ½Ð½Ð¾')
BC = (u'ÐÐ', u'ÐÐ»Ð¾ÐºÐ¸ÑÐ¾Ð²Ð°Ð½ Ð¿Ð¾ÑÑÐ¾ÑÐ½Ð½Ð¾')
AC = (u'ÐÐ', u'ÐÐºÑÐ¸Ð²ÐµÐ½ Ð¿Ð¾ÑÑÐ¾ÑÐ½Ð½Ð¾')

class EmployeesStatus(models.Model):
    name = models.CharField(max_length=128)
    status = enum.EnumField(StatusEnum, default=StatusEnum.AT)
</code></pre>

<p>It seems like project is alive, it also was updated for Django 1.10 and compartible with python 2 allegedly. So, what I'm doing wrong? </p>

<p>It looks like you are trying to use the backported enum from the 3.4 stdlib, but you installed <code>enum</code> -- you need to install <code>enum34</code>.</p>

python django enums