In our existing framework, any non-workflow view should be defined under settings.VIEW_URLS.
To simplify this workflow, I'm going to refactor this into a decorator based form.
from zengine.lib.decorators import view
@view() # this creates a mapping with "_zops_" prefix. ie: _zops_mark_offline_user
def mark_offline_user(current):
current.user.is_online(False)
# OR
@view('custom_path') # this creates: _zops_custom_path
def mark_offline_user(current):
current.user.is_online(False)
For background jobs, I'm also going to create a @bg_job decorator which will work in the same way with @view.
In our existing framework, any non-workflow view should be defined under settings.VIEW_URLS. To simplify this workflow, I'm going to refactor this into a decorator based form.
For background jobs, I'm also going to create a
@bg_job
decorator which will work in the same way with@view
.zengine