You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I need to filter a select menu showing only groups in a user's company. With sqlalchemy there was the QuerySelectField, however, this does not seem to be available in flask-mongoengine. Ideally, I would like to pass flask_login current_user to model_form as follows:
Hm, can "queryset" accept a function and execute it during runtime vs during the definition of the model form? If not, I guess you'll have to construct those querysets at the time of the request.
Not really sure as I can find very little documentation on "queryset". I have also posted this on stackoverflow. This should be maybe relabeled as a question.
I need to filter a select menu showing only groups in a user's company. With sqlalchemy there was the QuerySelectField, however, this does not seem to be available in flask-mongoengine. Ideally, I would like to pass flask_login current_user to model_form as follows:
However, since this places current_user outside the request context this results in errors. Does anyone have a clever idea on how to do this?
The text was updated successfully, but these errors were encountered: