oshipka/vm_gen/templates/routes_py

20 lines
1.0 KiB
Plaintext
Raw Normal View History

2020-06-05 12:38:25 +02:00
"""
!!!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 *
2020-06-07 13:13:14 +02:00
[[ name|camel_to_snake ]] = ModelView(app, [[name]])
2020-06-07 20:29:51 +02:00
[[ name|camel_to_snake ]].register_verb(view_context=get_view_context, verb="get", per_item=True)
[[ name|camel_to_snake ]].register_verb(view_context=list_view_context, verb="list")
[[ name|camel_to_snake ]].register_verb(view_context=table_view_context, verb="table")
[[ name|camel_to_snake ]].register_verb(view_context=search_view_context, verb="search")
[[ name|camel_to_snake ]].register_verb(view_context=create_view_context, verb="create", methods=["GET", "POST"])
[[ name|camel_to_snake ]].register_verb(view_context=update_view_context, verb="update", methods=["GET", "POST"], per_item=True)
[[ name|camel_to_snake ]].register_verb(view_context=delete_view_context, verb="delete", methods=["GET", "POST"] , per_item=True)