22 lines
1015 B
Plaintext
22 lines
1015 B
Plaintext
"""
|
|
!!!AUTOGENERATED: DO NOT EDIT!!!
|
|
|
|
Edit the hooks in webapp/routes/[[ name|camel_to_snake ]]_hooks.py instead
|
|
"""
|
|
|
|
from oshipka.webapp import app
|
|
from oshipka.webapp.views import ModelView
|
|
from webapp.models import [[ name ]]
|
|
from webapp.routes.[[ name|camel_to_snake ]]_hooks import *
|
|
|
|
[[ name|camel_to_snake ]] = ModelView(app, [[name]])
|
|
[% for verb, verb_values in _verbs.items() %]
|
|
[[ name|camel_to_snake ]].register_verb(view_context=[[ verb ]]_view_context,
|
|
verb="[[ verb ]]",
|
|
methods=[[ verb_values.methods ]],
|
|
per_item=[[ verb_values.per_item ]],
|
|
is_login_required=[[ verb_values.is_login_required if verb_values.is_login_required else 'False' ]],
|
|
the_roles_required=[[ verb_values.the_roles_required if verb_values.the_roles_required else '[]' ]],
|
|
)
|
|
[% endfor %]
|