A django widget which allows you to create multiple auth system.
Project description
# django-goncord
Django auth system.
Tested with Django 1.10.4 and Python 3.5.
### Installation guide
First install package using pip
```sh
pip install django-goncord
```
After installation register middleware and authentication backend in settings
```python
MIDDLEWARE_CLASSES = [
...
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django_goncord.middleware.GoncordMiddleware',
...
]
...
AUTHENTICATION_BACKENDS = [
'django.contrib.auth.backends.RemoteUserBackend',
]
```
Then register auth system url parameters in settings
```python
GONCORD = {
'BASE_URL': 'URL like http://www.my-site.ru',
'VALIDATE_URL': 'SUB_URL like /validate',
'LOGIN_URL': 'SUB_URL like /login',
'LOGOUT_URL': 'SUB_URL like /logout',
'REGISTER_URL': 'SUB_URL like /register'
}
```
for authentication you can register only **BASE_URL**, **VALIDATE_URL**, **LOGIN_URL** and **LOGOUT_URL**
at the end specify Django **LOGIN_URL** parameter
for working with package use **login_required** decorator from **django.contrib.auth.decorators**
Django auth system.
Tested with Django 1.10.4 and Python 3.5.
### Installation guide
First install package using pip
```sh
pip install django-goncord
```
After installation register middleware and authentication backend in settings
```python
MIDDLEWARE_CLASSES = [
...
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django_goncord.middleware.GoncordMiddleware',
...
]
...
AUTHENTICATION_BACKENDS = [
'django.contrib.auth.backends.RemoteUserBackend',
]
```
Then register auth system url parameters in settings
```python
GONCORD = {
'BASE_URL': 'URL like http://www.my-site.ru',
'VALIDATE_URL': 'SUB_URL like /validate',
'LOGIN_URL': 'SUB_URL like /login',
'LOGOUT_URL': 'SUB_URL like /logout',
'REGISTER_URL': 'SUB_URL like /register'
}
```
for authentication you can register only **BASE_URL**, **VALIDATE_URL**, **LOGIN_URL** and **LOGOUT_URL**
at the end specify Django **LOGIN_URL** parameter
for working with package use **login_required** decorator from **django.contrib.auth.decorators**
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
django-goncord-0.2.0.tar.gz
(3.5 kB
view details)
File details
Details for the file django-goncord-0.2.0.tar.gz
.
File metadata
- Download URL: django-goncord-0.2.0.tar.gz
- Upload date:
- Size: 3.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 78a78209a3b13f5d2c61f60a521217d669c00016d29adda8197e729f0a14ac83 |
|
MD5 | 196fd6e03f08e8e8a04abe5d55bbeeee |
|
BLAKE2b-256 | e79b204b15a9b0d7eda66f7ac4eb3315224b3b0e8bdd0de847b81788f240a974 |