Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why is NoticeType not just a simple Enum? #96

Open
lggwettmann opened this issue Apr 14, 2020 · 2 comments
Open

Why is NoticeType not just a simple Enum? #96

lggwettmann opened this issue Apr 14, 2020 · 2 comments
Labels

Comments

@lggwettmann
Copy link

lggwettmann commented Apr 14, 2020

Hey guys,

loving the idea of the package so far. I found the installation steps for the NoticeTypes quite interesting, though. I'd be curious to learn why you choose for saving the NoticeTypes in the DB while there is a need to hardcode them in the rest of the code?

Why did you not go for a simple Enum or object which a) doesn't need DB access b) is much easier to set up?

I'd be happy to provide a pull-request in case this is something you were contemplating. I understand that this could mean a breaking change with a new version of pinax-notifications.

@KatherineMichel
Copy link
Member

I don't know why the original authors didn't use enum. The choice goes back quite a few years (to 2008?). I think @jtauber and @brosner were involved. I don't know if they'd want to change to enum at this point or not. https://github.com/jtauber-archive/django-notification/tree/old-master

@lggwettmann
Copy link
Author

Thanks for your answer, @KatherineMichel.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants