Django app to interface with the ids infrastructure.
Project description
# django-idshost
Django app to integrate your project in the ids infrastructure.
### Installation
You can get django-idshost from PyPi:
```bash
pip install django-idshost
```
### Configure
To use the app you should add it to your `INSTALLED_APPS` in `settings.py`.
```python
INSTALLED_APPS = (
...
'django_idshost',
...
)
```
Django-idshost custom the backend, the midleware and the model of the django user, so you have to override these datas in the `settings.py`.
```python
AUTHENTICATION_BACKENDS = (
'django_idshost.auth.idsauth.IdsRemoteUserBackend', #use to authenticate an ids user
'django.contrib.auth.backends.ModelBackend',#if you want to keep the default authentication, keep this line
)
MIDDLEWARE_CLASSES = (
...
'django_idshost.auth.idsauth.IdsHeaderMiddleware',#allow the specific http header use by ids to transmit the authenticate user
...
)
AUTH_USER_MODEL = 'django_idshost.IdsUser'
```
You should also add your ids datas in the `settings.py`. These datas are transmited by ids.
```python
DJANGO_IDSHOST_SETTINGS = {
'APP_NAME': '...', #the name of the app 'xxx.idshost.fr'
'PRIVATE_IP': '...',#the private ip of your server in the ids infrastructure
}
```
Django app to integrate your project in the ids infrastructure.
### Installation
You can get django-idshost from PyPi:
```bash
pip install django-idshost
```
### Configure
To use the app you should add it to your `INSTALLED_APPS` in `settings.py`.
```python
INSTALLED_APPS = (
...
'django_idshost',
...
)
```
Django-idshost custom the backend, the midleware and the model of the django user, so you have to override these datas in the `settings.py`.
```python
AUTHENTICATION_BACKENDS = (
'django_idshost.auth.idsauth.IdsRemoteUserBackend', #use to authenticate an ids user
'django.contrib.auth.backends.ModelBackend',#if you want to keep the default authentication, keep this line
)
MIDDLEWARE_CLASSES = (
...
'django_idshost.auth.idsauth.IdsHeaderMiddleware',#allow the specific http header use by ids to transmit the authenticate user
...
)
AUTH_USER_MODEL = 'django_idshost.IdsUser'
```
You should also add your ids datas in the `settings.py`. These datas are transmited by ids.
```python
DJANGO_IDSHOST_SETTINGS = {
'APP_NAME': '...', #the name of the app 'xxx.idshost.fr'
'PRIVATE_IP': '...',#the private ip of your server in the ids infrastructure
}
```
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-idshost-0.1.0.tar.gz
(10.0 kB
view details)
File details
Details for the file django-idshost-0.1.0.tar.gz
.
File metadata
- Download URL: django-idshost-0.1.0.tar.gz
- Upload date:
- Size: 10.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 67c9dcbcc354387333624dbff49554a6bd75034b078123795664c4dce1df05c4 |
|
MD5 | 6ba28c9112ed2c38a7de72cd42de65e5 |
|
BLAKE2b-256 | a244f44c5534fa1ad52f03c65951b0659461f94e66770b9a066b62dd6276f599 |