Commit 3157f78f authored by Priit Laes's avatar Priit Laes

Improve inline formatting for docs

parent f15b4388
...@@ -138,28 +138,28 @@ class ModelView(BaseModelView): ...@@ -138,28 +138,28 @@ class ModelView(BaseModelView):
giving SQLAlchemy chance to manually cleanup any dependencies (many-to-many giving SQLAlchemy chance to manually cleanup any dependencies (many-to-many
relationships, etc). relationships, etc).
If set to True, will run DELETE statement which is somewhat faster, but If set to `True`, will run `DELETE` statement which is somewhat faster,
might leave corrupted data if you forget to configure DELETE CASCADE but might leave corrupted data if you forget to configure `DELETE
for your model. CASCADE` for your model.
""" """
inline_models = None inline_models = None
""" """
Inline related-model editing for models with parent to child relation. Inline related-model editing for models with parent to child relation.
Accept enumerable with one of the values: Accepts enumerable with one of the following possible values:
1. Child model class 1. Child model class::
class MyModelView(ModelView): class MyModelView(ModelView):
inline_models = (Post,) inline_models = (Post,)
2. Child model class and additional options 2. Child model class and additional options::
class MyModelView(ModelView): class MyModelView(ModelView):
inline_models = [(Post, dict(form_columns=['title']))] inline_models = [(Post, dict(form_columns=['title']))]
3. Django-like ``InlineFormAdmin`` class instance 3. Django-like ``InlineFormAdmin`` class instance::
class MyInlineForm(InlineFormAdmin): class MyInlineForm(InlineFormAdmin):
forum_columns = ('title', 'date') forum_columns = ('title', 'date')
......
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