Reformatting.
This commit is contained in:
parent
968511143a
commit
0ff72f86f5
1 changed files with 4 additions and 0 deletions
|
@ -28,15 +28,19 @@ Usage
|
|||
|
||||
If you are developing multiple Django sites, you should probably use
|
||||
[virtualenv][] to keep their dependencies separate.
|
||||
|
||||
1. Add `password_required` to `INSTALLED_APPS` in your
|
||||
[Django settings file][settings].
|
||||
|
||||
2. Set `PASSWORD_REQUIRED_PASSWORD` to the preferred password in your
|
||||
Django settings file. Example:
|
||||
|
||||
`PASSWORD_REQUIRED_PASSWORD = 'mysecretpassword'`
|
||||
|
||||
3. Add the password required login page to your [URLconf][]. Example:
|
||||
|
||||
`(r'^password_required/$', 'password_required.views.login'),`
|
||||
|
||||
4. Apply the `@password_required` decorator to your views like in this
|
||||
final code example.
|
||||
|
||||
|
|
Reference in a new issue