Skip to main content

Account login, logout, and password reset.

Project description

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 django-accounts-cbv`

Add `accounts` to your `INSTALLED_APPS` setting:

```python
INSTALLED_APPS = (
...
'accounts',
)
```

To your sites `url.py` add:

```python
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:

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

Middlewares
-----------

###LoginRequiredMiddleware
Require authentication for all views.

To enable it add `'accounts.middleware.LoginRequiredMiddleware'` to your `MIDDLEWARE_CLASSES` setting:

```python
MIDDLEWARE_CLASSES = (
...,
'accounts.middleware.LoginRequiredMiddleware',
)
```

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django-accounts-cbv-1.2.zip (14.6 kB view details)

Uploaded Source

File details

Details for the file django-accounts-cbv-1.2.zip.

File metadata

File hashes

Hashes for django-accounts-cbv-1.2.zip
Algorithm Hash digest
SHA256 a2fe957a92930b2e48aac905b2c5ab6cdcbdee789e297e9b745ea8b8b99ae12b
MD5 89b41f51b56047c42406d3c9f0c7c7c3
BLAKE2b-256 23882740e219ff77222660ef61e361fe2f1e8e122a93e53de210ac7559c9206b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page