blog/webapp/routes/tag.py
2021-05-01 16:19:02 +02:00

69 lines
2.1 KiB
Python

"""
!!!AUTOGENERATED: DO NOT EDIT!!!
Edit the hooks in webapp/routes/tag_hooks.py instead
"""
from oshipka.webapp import app
from oshipka.webapp.views import ModelView
from webapp.models import Tag
from webapp.routes.tag_hooks import *
tag = ModelView(app, Tag)
tag.register_verb(view_context=get_view_context,
verb="get",
methods=['GET'],
per_item=True,
is_login_required=False,
the_roles_required=[],
)
tag.register_verb(view_context=list_view_context,
verb="list",
methods=['GET'],
per_item=False,
is_login_required=False,
the_roles_required=[],
)
tag.register_verb(view_context=table_view_context,
verb="table",
methods=['GET'],
per_item=False,
is_login_required=False,
the_roles_required=[],
)
tag.register_verb(view_context=search_view_context,
verb="search",
methods=['GET'],
per_item=False,
is_login_required=False,
the_roles_required=[],
)
tag.register_verb(view_context=create_view_context,
verb="create",
methods=['GET', 'POST'],
per_item=False,
is_login_required=True,
the_roles_required=['admin'],
)
tag.register_verb(view_context=update_view_context,
verb="update",
methods=['GET', 'POST'],
per_item=True,
is_login_required=True,
the_roles_required=['admin'],
)
tag.register_verb(view_context=delete_view_context,
verb="delete",
methods=['GET', 'POST'],
per_item=True,
is_login_required=True,
the_roles_required=['admin'],
)