About resetpassword
resetpassword is a Pluggable application for TurboGears2 that permits to change user password or reset it when lost.
Installing
resetpassword can be installed both from pypi or from bitbucket:
pip install tgapp-resetpassword
should just work for most of the users
Plugging resetpassword
In your application config/app_cfg.py import plug:
from tgext.pluggable import plug
Then at the end of the file call plug with resetpassword:
plug(base_config, 'resetpassword')
You will be able to access the plugged application at http://localhost:8080/resetpassword.
If you use tgext.mailer you need to plug it:
plug(base_config, 'tgext.mailer')
Some options are available that can be set on .ini configuration file for your application. At least one option is required to make activation emails work:
resetpassword.email_sender -> Outgoing mails sender
If you are using tgext.mailer you need to set up some configuration, check here for available options: https://github.com/amol-/tgext.mailer.
If you are not using neither TurboMail or tgext.mailer a few more configuration options must be set to make activation email work:
resetpassword.smtp_host -> SMTP server to use to send emails
resetpassword.smtp_port -> SMTP server port
resetpassword.smtp_login -> Login for authentication on SMTP server
resetpassword.smtp_passwd -> Password for authentication on SMTP server
Plugin Options
When plugging tgapp-resetpassword the following options can be passed to the plug call:
reset_password_form -> Full python path of the form class to use for Reset Password form. By default resetpassword.lib.forms.ResetPasswordForm is used.
new_password_form -> Full python path of the form class to use for New Password form. By default registration.lib.forms.NewPasswordForm is used.
So the plug call might look like:
plug(
base_config,
'resetpassword',
reset_password_form='myproject.lib.resetpassword_forms.ResetPasswordForm',
new_password_form='myproject.lib.resetpassword_forms.NewPasswordForm',
)
Available Hooks
resetpassword makes available a some hooks which will be called during some actions to alter the default behavior of the appplications:
resetpassword.on_begin_reset_request(data)
resetpassword.on_request(user, email_data, reset_link)
resetpassword.before_render_change_password_template(user, deserialized_data)
resetpassword.before_redirect(redirect_url)
Exposed Templates
The templates used by resetpassword and that can be replaced with tgext.pluggable.replace_template are:
resetpassword.templates.index -> Page with password reset request form
resetpassword.templates.change_password -> Page with change password request
Example usage (after the plug call):
from tgext.pluggable import replace_template replace_template(base_config, 'resetpassword.templates.index', 'myproject.templates.reset_password') replace_template(base_config, 'resetpassword.templates.change_password', 'myproject.templates.change_password')
Metadata
Release files for tgapp-resetpassword 0.2.7
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| tgapp-resetpassword-0.2.7.tar.gz | 15.1 kB | Without provenance | Details |
Release files / tgapp-resetpassword-0.2.7.tar.gz
| Download URL | tgapp-resetpassword-0.2.7.tar.gz |
|---|---|
| Size | 15.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f6da4c8f5c7c3b5c2f35743b23ed9569344fceaa1b4e3d2de7c061fd964a54ef
|
|
BLAKE2b-256 checksum How to use checksums |
2b9b6f5d88a987610f081c29c3b29c8e7fdf92dbcffcf76e2e1e0001698fefce
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
Python-urllib/2.7
|
Security for tgapp-resetpassword 0.2.7
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.