Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
flask-admin
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Python-Dev
flask-admin
Commits
f44613ed
Commit
f44613ed
authored
Apr 02, 2012
by
Serge S. Koval
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Started writing model creation guidelines.
parent
20ce56f2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
0 deletions
+34
-0
model_guidelines.rst
doc/model_guidelines.rst
+34
-0
No files found.
doc/model_guidelines.rst
0 → 100644
View file @
f44613ed
Adding new model backend
========================
If you want to implement new database backend to use with model views, follow steps from this guideline.
1. Create new class and derive it from flask.ext.adminex.model.BaseModel::
class DbModel(BaseModel):
pass
2. Implement following scaffolding methods::
- `scaffold_list_columns`
- Make sure you support `excluded_list_columns`
- `scaffold_sortable_columns`
- `scaffold_form`
- Make sure you support `excluded_form_columns`
- `init_search`
If your database does not support free-form search,
return `False` from the `init_search`.
If your database does not support sorting, override
`get_sortable_columns` and return empty dictionary.
3. Implement data access methods::
- `get_list`
- `get_one`
4. Implement model management methods
- `create_model`
- `update_model`
- `delete_model`
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment