From ef382f69b7bda57b0e3c4200954777a94ba2deac Mon Sep 17 00:00:00 2001 From: Brian Everett Peterson Date: Mon, 19 Aug 2019 16:27:21 -0600 Subject: [PATCH 1/2] Update README.md --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 813a59e..068aa60 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,7 @@ 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: - +```python app.register_blueprint(SecureAdminBlueprint( name='Your Project Name', url_prefix='secure-admin' @@ -42,6 +42,7 @@ for customization of these model views as a fourth argument: 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, From 0ec25554d811d7fae836e627535b2c2902954cda Mon Sep 17 00:00:00 2001 From: Brian Everett Peterson Date: Mon, 19 Aug 2019 16:27:40 -0600 Subject: [PATCH 2/2] Update README.md --- README.md | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 068aa60..a073964 100644 --- a/README.md +++ b/README.md @@ -32,16 +32,16 @@ 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: ```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) - ) - ], {}, {})) +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