throat
throat copied to clipboard
Adds feature to let users opt-in to have notifications forwarded via email.
Adds feature to let users opt-in to have notifications forwarded via email.
@Polsaker May I ask for your opinion on this one? Since this will require more works (i.e. tests and some polish) I'd like to know beforehand if it's shaping into something you could find acceptable.
Sorry for the delay, this looks good to merge now
Sorry for the delay, this looks good to merge now
Thanks, let me know if there's some post-merge work to do on that in case you'd get some feedbacks from users.
There was a missing migration that I already added. Will let you know if anything else happens
@why-not-try-calmer in app/config.py can you maybe make allow_email_forwarded_notifications
a part of configurable_defaults
instead of defaults
? This way we don't have to mess with it inside config.yaml (we also now miss an updated example.config.yaml, by the way).
Thanks!
Sounds like a reasonable request.
For now I'm testing with the config.yaml option set to True and getting:
Traceback (most recent call last):
File "/home/app/.pyenv/versions/app/lib/python3.9/site-packages/flask/app.py", line 2531, in wsgi_app
response = self.handle_exception(e)
File "/home/app/.pyenv/versions/app/lib/python3.9/site-packages/flask/app.py", line 2528, in wsgi_app
response = self.full_dispatch_request()
File "/home/app/.pyenv/versions/app/lib/python3.9/site-packages/flask/app.py", line 1825, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/home/app/.pyenv/versions/app/lib/python3.9/site-packages/flask/app.py", line 1823, in full_dispatch_request
rv = self.dispatch_request()
File "/home/app/.pyenv/versions/app/lib/python3.9/site-packages/flask/app.py", line 1799, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
File "/home/app/.pyenv/versions/app/lib/python3.9/site-packages/flask_login/utils.py", line 290, in decorated_view
return current_app.ensure_sync(func)(*args, **kwargs)
File "/home/app/ceknito/app/views/user.py", line 331, in edit_user
return engine.get_template("user/settings/preferences.html").render(
File "/home/app/ceknito/app/misc.py", line 136, in render
result = super(TemplateWithLogging, self).render(ctx)
File "/home/app/.pyenv/versions/app/lib/python3.9/site-packages/wheezy/template/engine.py", line 28, in render
return self.render_template(ctx, {}, {})
File "user/settings/preferences.html", line 64, in render
File "/home/app/.pyenv/versions/app/lib/python3.9/site-packages/wheezy/template/engine.py", line 70, in render
return self.renders[name](ctx, local_defs, super_defs)
File "shared/layout.html", line 178, in render
File "shared/layout.html", line 169, in content
File "user/settings/preferences.html", line 39, in main
AttributeError: 'EditUserForm' object has no attribute 'email_forwarded_notifications'
BTW my testing branch is here, maybe I didn't merge something correctly? https://github.com/globalistas/ceknito/tree/newemail
After I've managed to fix my pending PR, we can look more into it.
After I've managed to fix my pending PR, we can look more into it.
Seeing as your pending PR is still not fixed, can you maybe advise on the above error so that I can at least use your previous PR (and the other PRs introduced since then by Polsaker)?