Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Brian Peterson committed Aug 29, 2019
2 parents 0be9c93 + 0ec2555 commit 62e5f06
Showing 1 changed file with 12 additions and 11 deletions.
23 changes: 12 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,18 @@ app.register_blueprint(SecureAdminBlueprint(
Add sqlsoup models to your admin view by passing a list of their names
as a third argument to `SecureAdminBlueprint`, and a list of view options
for customization of these model views as a fourth argument:

app.register_blueprint(SecureAdminBlueprint(
name='Your Project Name',
url_prefix='secure-admin'
models=['videos', 'captions', 'languages'],
view_options=[
dict(
can_create=False,
form_overrides=dict(filename=FileUploadField)
)
], {}, {}))
```python
app.register_blueprint(SecureAdminBlueprint(
name='Your Project Name',
url_prefix='secure-admin'
models=['videos', 'captions', 'languages'],
view_options=[
dict(
can_create=False,
form_overrides=dict(filename=FileUploadField)
)
], {}, {}))
```

See https://flask-admin.readthedocs.io/en/latest/api/mod_contrib_sqla/#flask_admin.contrib.sqla.ModelView
and its parent class, https://flask-admin.readthedocs.io/en/latest/api/mod_model/#flask_admin.model.BaseModelView,
Expand Down

0 comments on commit 62e5f06

Please sign in to comment.