pluserable.actions module¶
The action layer is also called “service” layer.
It stands between the model layer and the view layer. It is the heart of an application and contains its business rules.
This is because MVC/MVT is insufficient for large apps. Views should be thin. Business rules must be decoupled from the web framework.
- class pluserable.actions.CheckCredentials(upeto)[source]¶
Bases:
pluserable.actions.UserlessAction
Business rules decoupled from the web framework and from persistence.
- pluserable.actions.create_activation(request, user)[source]¶
Associate the user with a new activation, or keep the existing one.
Also send an email message with the link for the user to click.
- pluserable.actions.get_activation_link(request, user_id, code)[source]¶
Return the link for the user to click on an email message.
route_url()
uses the protocol and domain detected from the current request. Unfortunately in production, that’s usually https for the load balancer, but http for a backend Pyramid server. So we take advantage of ascheme_domain_port
configuration setting if provided.- Return type
str
- pluserable.actions.get_reset_link(request, code)[source]¶
Return the link for the user to click on an email message.
route_url()
uses the protocol and domain detected from the current request. Unfortunately in production, that’s usually https for the load balancer, but http for a backend Pyramid server. So we take advantage of ascheme_domain_port
configuration setting if provided.- Return type
str