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