Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Add notifications to admins about new users #205
Description of problem
Somehow related to #203. When user is being registered and settings.ADMINS are set, the message is being shown. But I would expect some notification from Kiwi to admins as well like "User XXX have been registered and is waiting for activation. Please proceed to admin panel in order to activate the account"
Component (web, API, etc)
Version or commit hash (if applicable)
How often reproducible
Steps to Reproduce
Admins don't receive any notifications
Some email should be sent
Actually there is one more thing to think about - why is there settings.ADMINS at all? There are already user accounts in Kiwi with admin\superuser rights - cannot you just take all superusers or members of Administrators group and show\notify them instead of using custom setting?
Good idea, I can even do one better. We can trigger a signal after a user is registered and add a default signal handler to notify admins via email. In addition you can tweak settings and add additional handlers which can perform arbitrary actions. How does this sound ?
@atodorov how do you think will it make sense to have the code in settings.py, but maybe commented out? In general, this signals things doesn't seem "well-known" for Django apps, so maybe it would be better to have section like "### Signals connecting" in settings.py so it could be easily seen and uncommented if needed.
This is already in the docs.
which has an example of connecting the notification handler in your settings file and a link to the official Django documentation if you need a more complex setup (e.g. using AppConfig).
Yes, I saw it, but I think many users either won't read the docs so carefully or will miss this small part. It will be much easier to have section in settings like: