geonature.core.admin.admin¶
Attributes¶
Classes¶
Default administrative interface index page when visiting the |
|
SQLAlchemy model view |
|
SQLAlchemy model view |
Module Contents¶
- class geonature.core.admin.admin.MyHomeView(name=None, category=None, endpoint=None, url=None, template='admin/index.html', menu_class_name=None, menu_icon_type=None, menu_icon_value=None)[source]¶
Bases:
flask_admin.AdminIndexViewDefault administrative interface index page when visiting the
/admin/URL.It can be overridden by passing your own view class to the
Adminconstructor:class MyHomeView(AdminIndexView): @expose('/') def index(self): arg1 = 'Hello' return self.render('admin/myhome.html', arg1=arg1) admin = Admin(index_view=MyHomeView())
Also, you can change the root url from /admin to / with the following:
admin = Admin( app, index_view=AdminIndexView( name='Home', template='admin/myhome.html', url='/' ) )
Default values for the index page are:
If a name is not provided, “Home” will be used.
If an endpoint is not provided, will default to
adminDefault URL route is
/admin.Automatically associates with static folder.
Default template is
admin/index.html
- class geonature.core.admin.admin.ProtectedBibNomenclaturesTypesAdmin(model, session, name=None, category=None, endpoint=None, url=None, static_folder=None, menu_class_name=None, menu_icon_type=None, menu_icon_value=None)[source]¶
Bases:
geonature.core.admin.utils.CruvedProtectedMixin,pypnnomenclature.admin.BibNomenclaturesTypesAdminSQLAlchemy model view
Usage sample:
admin = Admin() admin.add_view(ModelView(User, db.session))
- class geonature.core.admin.admin.ProtectedTNomenclaturesAdmin(model, session, name=None, category=None, endpoint=None, url=None, static_folder=None, menu_class_name=None, menu_icon_type=None, menu_icon_value=None)[source]¶
Bases:
geonature.core.admin.utils.CruvedProtectedMixin,pypnnomenclature.admin.TNomenclaturesAdminSQLAlchemy model view
Usage sample:
admin = Admin() admin.add_view(ModelView(User, db.session))