-
Notifications
You must be signed in to change notification settings - Fork 13
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
Models need a url_for() #9
Comments
Given the experience with SQLAlchemy's |
Should the parameter to |
One downside to having This suggests that the |
We've since switched over from Similarly, |
@iambibhas Could you work on a PR that replaces coaster/coaster/sqlalchemy/mixins.py Lines 229 to 231 in 02a76cd
|
Flask's
url_for
is view-centric. Given a view name and parameters, it generates a URL. We often have to work the reverse: given a model instance, create a URL to its view. All BaseMixin models should have aurl_for(view="view")
method that implementations can override to return a URL.To be decided: If a
view
(default valueview
, implying the primary public view) is not known by the model, should the method:None
, implying no known view? orThe text was updated successfully, but these errors were encountered: