Closed reffael closed 9 years ago
Yes, using any king of view (BaseView, ModelView ...) create your custom endpoints:
from flask.ext.appbuilder import ModelView
from flask.ext.appbuilder.models.sqla.interface import SQLAInterface
class GroupModelView(ModelView):
datamodel = SQLAInterface(ContactGroup)
related_views = [ContactModelView]
@expose('/mycustomview')
@has_access
def mycustomview(self):
# do whatever you want
return self.render_template('mycustomview.html')
Then on template extend base:
{% extends "appbuilder/base.html" %}
{% block content %}
....
{% endblock %}
This will render you custom view with the menus and bootstrap, and will create an extra permission called 'can mycustomview' on GroupModelView.
thanks, going to try it
but with the look&feel of the rest of the pages, using the same permissions, roles, menus and so on.. ?