From c10ec29fe587f01ac9d485e196ea78a75c0915c6 Mon Sep 17 00:00:00 2001 From: Cameron Moore Date: Sun, 7 Sep 2014 21:37:33 -0500 Subject: [PATCH] Fix small issues in docs --- docs/configuration.rst | 20 ++++++++++---------- docs/customizing.rst | 8 ++++---- docs/features.rst | 2 +- docs/models.rst | 4 ++-- 4 files changed, 17 insertions(+), 17 deletions(-) diff --git a/docs/configuration.rst b/docs/configuration.rst index c9fa531..018d4ae 100644 --- a/docs/configuration.rst +++ b/docs/configuration.rst @@ -15,7 +15,7 @@ Core ``SECURITY_URL_PREFIX`` Specifies the URL prefix for the Flask-Security blueprint. Defaults to ``None``. -``SECURITY_FLASH_MESSAGES`` Specifies wether or not to flash +``SECURITY_FLASH_MESSAGES`` Specifies whether or not to flash messages during security procedures. Defaults to ``True``. ``SECURITY_PASSWORD_HASH`` Specifies the password hash algorithm to @@ -69,37 +69,37 @@ URLs and Views ``SECURITY_CONFIRM_ERROR_VIEW`` Specifies the view to redirect to if a confirmation error occurs. This value can be set to a URL or an endpoint name. If this value is - ``None`` the user is presented the default view + ``None``, the user is presented the default view to resend a confirmation link. Defaults to ``None``. ``SECURITY_POST_REGISTER_VIEW`` Specifies the view to redirect to after a user successfully registers. This value can be set to a URL or an endpoint name. If this value is - ``None`` the user is redirected to the value of + ``None``, the user is redirected to the value of ``SECURITY_POST_LOGIN_VIEW``. Defaults to ``None``. ``SECURITY_POST_CONFIRM_VIEW`` Specifies the view to redirect to after a user successfully confirms their email. This value can be set to a URL or an endpoint name. If this - value is ``None`` the user is redirected to the + value is ``None``, the user is redirected to the value of ``SECURITY_POST_LOGIN_VIEW``. Defaults to ``None``. ``SECURITY_POST_RESET_VIEW`` Specifies the view to redirect to after a user successfully resets their password. This value can be set to a URL or an endpoint name. If this - value is ``None`` the user is redirected to the + value is ``None``, the user is redirected to the value of ``SECURITY_POST_LOGIN_VIEW``. Defaults to ``None``. ``SECURITY_POST_CHANGE_VIEW`` Specifies the view to redirect to after a user successfully changes their password. This value can be set to a URL or an endpoint name. If this - value is ``None`` the user is redirected to the + value is ``None``, the user is redirected to the value of ``SECURITY_POST_LOGIN_VIEW``. Defaults to ``None``. ``SECURITY_UNAUTHORIZED_VIEW`` Specifies the view to redirect to if a user attempts to access a URL/endpoint that they do not have permission to access. If this value is - ``None`` the user is presented with a default + ``None``, the user is presented with a default HTTP 403 response. Defaults to ``None``. =============================== ================================================ @@ -144,7 +144,7 @@ Feature Flags ========================= ====================================================== ``SECURITY_CONFIRMABLE`` Specifies if users are required to confirm their email address when registering a new account. If this value - is `True` Flask-Security creates an endpoint to handle + is `True`, Flask-Security creates an endpoint to handle confirmations and requests to resend confirmation instructions. The URL for this endpoint is specified by the ``SECURITY_CONFIRM_URL`` configuration option. @@ -158,11 +158,11 @@ Feature Flags specified by the ``SECURITY_RESET_URL`` configuration option. Defaults to ``False``. ``SECURITY_TRACKABLE`` Specifies if Flask-Security should track basic user - login statistics. If set to ``True`` ensure your + login statistics. If set to ``True``, ensure your models have the required fields/attribues. Defaults to ``False`` ``SECURITY_PASSWORDLESS`` Specifies if Flask-Security should enable the - passwordless login feature. If set to ``True`` users + passwordless login feature. If set to ``True``, users are not required to enter a password to login but are sent an email with a login link. This feature is experimental and should be used with caution. Defaults diff --git a/docs/customizing.rst b/docs/customizing.rst index 35a9a70..41cb6e1 100644 --- a/docs/customizing.rst +++ b/docs/customizing.rst @@ -2,7 +2,7 @@ Customizing Views ================= Flask-Security bootstraps your application with various views for handling its -configured features to get you up and running as quick as possible. However, +configured features to get you up and running as quickly as possible. However, you'll probably want to change the way these views look to be more in line with your application's visual design. @@ -36,7 +36,7 @@ Flask application context processor: * ``_form``: A form object for the view * ``security``: The Flask-Security extension object -To add more values to the template context you can specify a context processor +To add more values to the template context, you can specify a context processor for all views or a specific view. For example:: security = Security(app, user_datastore) @@ -131,7 +131,7 @@ Overriding these templates is simple: Each template is passed a template context object that includes values for any links that are required in the email. If you require more values in the -templates you can specify an email context processor with the +templates, you can specify an email context processor with the ``mail_context_processor`` decorator. For example:: security = Security(app, user_datastore) @@ -146,7 +146,7 @@ Emails with Celery ------------------ Sometimes it makes sense to send emails via a task queue, such as `Celery`_. -To delay the sending of emails you can use the ``@security.send_mail_task`` +To delay the sending of emails, you can use the ``@security.send_mail_task`` decorator like so:: # Setup the task diff --git a/docs/features.rst b/docs/features.rst index 4828661..bc1e5d2 100644 --- a/docs/features.rst +++ b/docs/features.rst @@ -24,7 +24,7 @@ instance, you may assign roles such as `Admin`, `Editor`, `SuperUser`, or a combination of said roles to a user. Access control is based on the role name and all roles should be uniquely named. This feature is implemented using the `Flask-Principal`_ extension. If you'd like to implement more granular access -control you can refer to the Flask-Princpal `documentation on this topic`_. +control, you can refer to the Flask-Principal `documentation on this topic`_. Password Encryption diff --git a/docs/models.rst b/docs/models.rst index 6fea2e4..cb4c111 100644 --- a/docs/models.rst +++ b/docs/models.rst @@ -32,7 +32,7 @@ Confirmable ^^^^^^^^^^^ If you enable account confirmation by setting your application's -`SECURITY_CONFIRMABLE` configuration value to `True` your `User` model will +`SECURITY_CONFIRMABLE` configuration value to `True`, your `User` model will require the following additional field: * ``confirmed_at`` @@ -41,7 +41,7 @@ Trackable ^^^^^^^^^ If you enable user tracking by setting your application's `SECURITY_TRACKABLE` -configuration value to `True` your `User` model will require the following +configuration value to `True`, your `User` model will require the following additional fields: * ``last_login_at``