django-accounts /

Filename Size Date modified Message
accounts
tests
130 B
1.5 KB
98 B
1.8 KB
12 B
1.3 KB
100 B

Django Accounts

Django Accounts re-implements several views from Django contrib auth to use the messageing framework instead stand-alone pages for simple messages. It also includes a email authentication backend.

Installation

Run pip install hg+https://bitbucket.org/nextscreenlabs/django-accounts

Add accounts to your INSTALLED_APPS setting:

INSTALLED_APPS = (
    ...
    'accounts',
)

To your sites url.py add:

urlpatterns = patterns('',
    ...
    url(r'^accounts/', include('accounts.urls')),
)

Authentication Backends

EmailBackend

The email authentication backend will allow users to login with the email address and password.

To enable it add 'accounts.auth_backends.EmailBackend' to your AUTHENTICATION_BACKENDS setting:

AUTHENTICATION_BACKENDS = (
    'accounts.auth_backends.EmailBackend',
    'django.contrib.auth.backends.ModelBackend',
)

Views

Login

Login inherits from FormView for easy extensibility.

Logout

Logout inhertis from RedirectView for easy extensibility. It also displays a logout message.

PasswordReset

PasswordReset inherits from FormView for easy extensibility. It displays a message once a reset request is submited.

PasswordResetConfirm

PasswordResetConfirm inherits from FormView for easy extensibility. It displays a message once the user has changed their password.

UserUpdate

UserUpdate inherits from UpdateView for easy extensibility. It allows a user change their account information.

Forms

UserForm

A form for changing an existing user's username and/or password. The password is optional and the form will only attempt to update the password if text is in the password input and it matches the confimation input.

Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.