-
Notifications
You must be signed in to change notification settings - Fork 293
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
Simplify programmatically sending invitations #181
Comments
Nice to find out that someone is actually using the Great minds think alike: Flask-User v0.9 (alpha) and v1.0 (stable) will provide customizable view methods inside a customizable CustomUserManager class. My plan is to offer low level 'building block' methods that views can use. This building blocks will also be available for custom use such as your command line invitation. Stay tuned. Here is a v0.9 docs preview: http://flask-user.readthedocs.io/en/latest/ |
@lingthio , I start from basic_app.py. Flask-User==0.6.19 All the user related URLs are accessible except the user/invite, which returns 404 Not Found. Could I know how to enable user invitation? |
I know this is an old thread, but here goes. I commented out a raise exception that was preventing the /user/invite page to show... I guess that's for @northtree -- I'll post later the file and line numbers Now when I invite a user (via email address) I get a 500 code...It's odd since it does do the right flash() response when an email address is already present in the system....looking at the error log on the server, it's point to this:
from here: /site-packages/flask_user/db_manager.py", line 125, in add_user_invitation any help or ideas would be greatly appreciated...I'm thinking of trying to build my own invite system that sends a URL with an AUTH token into the the Registration page (I'm guessing that's exactly how this setup in flask-user should work but it seems to be a bit buggy here). Thanks for reading this! |
Hi everyone, @lingthio I really enjoy your work here! I read your comment about the upcoming custom classes you'll be introducing. |
I'm working on an application that has
USER_ENABLE_INVITATION
andUSER_REQUIRE_INVITATION
set. In the initial database, there are no users and an elegant way to bootstrap that would seem to run a flask cli command to send an initial invitation.With the code shown below, I can send an invitation as follows:
However, the below code is quite long and mostly copy-pasted from the
views.invite
function. It would probably be more elegant ifUserManager
exposed aninvite()
method (or something like that), that could be used from the application as well as fromviews.invite
.Here's what I'm using now:
The text was updated successfully, but these errors were encountered: