Re: Database agnostic EnumField

2017-10-20 Thread Ashley Waite
Thanks for that link Tom, I thought I'd come across that before but forgot where I saw the discussion! That definitely seems like the right place. Jani, I patch in several changes to core classes in order to do this without any of those caveats, but have tried to use as few as was possible. Spe

Re: Database agnostic EnumField

2017-10-20 Thread Tom Forbes
There is a maybe/someday ticket for this here: https://code.djangoproject. com/ticket/24342 If your interested you could work on adding this into Django through that ticket, it seems like an interesting idea. When removing an enum value, how do you handle existing records? Are all supported datab

Re: Database agnostic EnumField

2017-10-20 Thread Jani Tiainen
Hi. In general features that can live outside Django (doesn't require changes in Django core to be implemented) needs quite well established de facto standard in community to be included in the Django itself. So best thing to do is to make sure that your implementation can work with all current b

Database agnostic EnumField

2017-10-20 Thread Ashley Waite
I've been working a bit on an EnumField implementation because it'll save me a lot of future time in a project, and existing implementations seem to be fragile, non-reversible, or one-database-only. Wondering why there isn't a PEP435 based EnumField in Django itself, I didn't find many answers w