Closed sam-ghosh closed 6 years ago
@somghosh Hi. I'm using Django 1.9.6 and haven't problem with Enum
This is not working for me on Django 1.9.
@Godod: did you migrate from an older version or did you start clean with 1.9.6?
This is a snipped of the code that fails for me:
from django.db import models
from django_enumfield import enum
class VisibilityKind(enum.Enum):
PRIVATE = 1
PROTECTED = 2
PUBLIC = 3
PACKAGE = 4
labels = {
PRIVATE: 'private',
PROTECTED: 'protected',
PUBLIC: 'public',
PACKAGE: 'package',
}
class NamedElement(models.Model):
visibility = enum.EnumField(VisibilityKind)
makemigrations
fails with this error code:
TypeError: Couldn't reconstruct field visibility on my_app.NamedElement: __init__() missing 1
required positional argument: 'enum'
Running Django 1.9.7 on Python 3.5.1
@sanbales I've started from django 1.9 and has been updated django every stable version. Now I have 1.9.8 and all ok with EnumField.
@Godod thank you. I'll try to figure out what is going on. Cheers!
Figure out what's wrong? I'm getting the same error too.
@jturmel : pip install --pre django-enumfield==1.3b2 got me sorted with Django==1.9.9 and Python 3.4.3
@vlordier that worked for me! Thanks.
Sorry folks, we'll push a stable update soon so it works without --pre
.
1.4 has been released. Please reopen if it doesn't work for any reason
I am seeing that it is supported till 1.8 as of late 2015 - is this working with 1.9 now?