Skip to content

Commit

Permalink
docs
Browse files Browse the repository at this point in the history
  • Loading branch information
lingthio committed Oct 2, 2014
1 parent dbf067a commit 82e5c49
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 11 deletions.
2 changes: 2 additions & 0 deletions docs/source/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ Config Settings

.. include:: includes/config_urls.txt

.. include:: includes/config_endpoints.txt

.. include:: includes/config_email_templates.txt

.. include:: includes/config_form_templates.txt
Expand Down
10 changes: 9 additions & 1 deletion docs/source/customization.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ behaviors that can be customized as needed:
* `Password and Username validators`_
* `Password hashing`_
* `URLs`_
* `Endpoints`_
* `Email template filenames`_
* `Form template filenames`_
* `Token generation`_
Expand Down Expand Up @@ -475,11 +476,18 @@ Custom view functions are specified by setting an attribute on the Flask-User's

URLs
----
Endpoint URLs can be customized through the application's config
URLs can be customized through the application's config

.. include:: includes/config_urls.txt


Endpoints
---------
Endpoints can be customized through the application's config

.. include:: includes/config_endpoints.txt


Email Template filenames
------------------------
Email template filenames can be customized through the application's config
Expand Down
22 changes: 22 additions & 0 deletions docs/source/includes/config_endpoints.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
::

# Endpoints are converted to URLs using url_for()
# The empty endpoint ('') will be mapped to the root URL ('/')

# Endpoints # Default
USER_AFTER_CHANGE_PASSWORD_ENDPOINT = '' # v0.5.3 and up
USER_AFTER_CHANGE_USERNAME_ENDPOINT = '' # v0.5.3 and up
USER_AFTER_LOGIN_ENDPOINT = '' # v0.5.3 and up
USER_AFTER_LOGOUT_ENDPOINT = 'user.login' # v0.5.3 and up
USER_AFTER_REGISTER_ENDPOINT = '' # v0.5.3 and up
USER_AFTER_CONFIRM_ENDPOINT = '' # v0.5.3 and up

# Unauthenticated users trying to access
# a view that has been decorated with @login_required or @roles_required
# will be redirected to this endpoint
USER_UNAUTHENTICATED_ENDPOINT = 'user.login' # v0.5.3 and up

# Unauthorized users trying to access
# a view that has been decorated with @roles_required
# will be redirected to this endpoint
USER_UNAUTHORIZED_ENDPOINT = '' # v0.5.3 and up
10 changes: 0 additions & 10 deletions docs/source/includes/config_urls.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,3 @@
USER_REGISTER_URL = '/user/register'
USER_RESEND_CONFIRM_EMAIL_URL = '/user/resend-confirm-email' # v0.5.0 and up
USER_RESET_PASSWORD_URL = '/user/reset-password/<token>'

# Unauthenticated users trying to access a view
# that has been decorated with @login_required or @roles_required
# will be redirected to this URL
USER_UNAUTHENTICATED_URL = USER_LOGIN_URL

# Unauthorized users trying to access a view
# that has been decorated with @roles_required
# will be redirected to this URL
USER_UNAUTHORIZED_URL = '/'
1 change: 1 addition & 0 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ Feeling generous? `Tip me on Gittip <https://www.gittip.com/lingthio/>`_

Revision History
----------------
* v0.5.3 USER_AUTO_LOGIN_* and USER_AFTER_*_ENDPOINT settings
* v0.5.2 USER_AUTO_LOGIN=True setting to auto-login already logged in users in user.login page.
* v0.5.1 Support for multiple emails per user.
* v0.5.0 Added ``resend_confirm_email``.
Expand Down

0 comments on commit 82e5c49

Please sign in to comment.