Commit 74a4c616 authored by Serge S. Koval's avatar Serge S. Koval

Documentation fixes

parent ee784fad
...@@ -9,5 +9,5 @@ API ...@@ -9,5 +9,5 @@ API
mod_form mod_form
mod_tools mod_tools
mod_ext_sqlamodel mod_contrib_sqlamodel
mod_ext_fileadmin mod_contrib_fileadmin
``flask.ext.admin.contrib.fileadmin``
=====================================
.. automodule:: flask.ext.admin.contrib.fileadmin
.. autoclass:: FileAdmin
:members:
:exclude-members: can_upload, can_delete, can_delete_dirs, can_mkdir, can_rename,
allowed_extensions, list_template, upload_template, mkdir_template,
rename_template
.. autoattribute:: can_upload
.. autoattribute:: can_delete
.. autoattribute:: can_delete_dirs
.. autoattribute:: can_mkdir
.. autoattribute:: can_rename
.. autoattribute:: allowed_extensions
.. autoattribute:: list_template
.. autoattribute:: upload_template
.. autoattribute:: mkdir_template
.. autoattribute:: rename_template
``flask.ext.admin.contrib.sqlamodel``
=====================================
.. automodule:: flask.ext.admin.contrib.sqlamodel
.. autoclass:: ModelView
:members:
:inherited-members:
:exclude-members: hide_backrefs, auto_select_related, list_select_related,
searchable_columns, filter_converter
Class inherits configuration options from :class:`~flask.ext.admin.model.BaseModelView` and they're not displayed here.
.. autoattribute:: hide_backrefs
.. autoattribute:: auto_select_related
.. autoattribute:: list_select_related
.. autoattribute:: searchable_columns
.. autoattribute:: filter_converter
...@@ -24,14 +24,14 @@ Steps to add new model backend: ...@@ -24,14 +24,14 @@ Steps to add new model backend:
By default, all model views accept model class and it By default, all model views accept model class and it
will be stored as ``self.model``. will be stored as ``self.model``.
2. Implement following scaffolding methods:: 2. Implement following scaffolding methods:
- :meth:`~flask.ext.admin.model.BaseModelView.get_pk_value` - :meth:`~flask.ext.admin.model.BaseModelView.get_pk_value`
This method will return primary key value from This method will return primary key value from
the model. For example, in SQLAlchemy backend, the model. For example, in SQLAlchemy backend,
it gets primary key from the model (:meth:`~flask.ext.admin.contrib.sqla.ModelView.scaffold_pk), caches it it gets primary key from the model using :meth:`~flask.ext.admin.contrib.sqlamodel.ModelView.scaffold_pk`, caches it
and returns actual value from the model from ``get_pk_value`` when requested. and returns actual value from the model when requested.
For example:: For example::
...@@ -103,7 +103,7 @@ Steps to add new model backend: ...@@ -103,7 +103,7 @@ Steps to add new model backend:
filtering logic for this filter type. filtering logic for this filter type.
Lets take SQLAlchemy model backend as an example. Lets take SQLAlchemy model backend as an example.
All SQLAlchemy filters derive from :class:`~flask.ext.admin.contrib.sqla.filters.BaseSQLAFilter` class. All SQLAlchemy filters derive from :class:`~flask.ext.admin.contrib.sqlamodel.filters.BaseSQLAFilter` class.
Each filter implements one simple filter SQL operation Each filter implements one simple filter SQL operation
(like, not like, greater, etc) and accepts column as (like, not like, greater, etc) and accepts column as
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment