scattenlaeufer / zapf-resotool

A bit of software to manage ZaPF resolutions
GNU Affero General Public License v3.0
4 stars 4 forks source link

Switch IntegerFields in resoapp/models.py for EnumFields #10

Closed scattenlaeufer closed 5 years ago

scattenlaeufer commented 5 years ago

Sadly django-enumfield's EnumField is only a wrapper for Django's standard IntegerField.

For the long term future it might be an idea to write our own wrapper for IntegerField, that works with Python's enum module.

behrmann commented 5 years ago

I like this, some intentions become much clearer, but a few questions...

behrmann commented 5 years ago

Ah, ok, nevermind. Reading more of it I got it. I don't quite like that their enum doesn't work with the enums from the standard library and initially I thought that everything could be provided by adding two methods to our enums, but at least the _transitions seem to be something that regular enums don't provide. Everything else would have been only a matter of taste too.