Custom django auth backend for authorization via odoo
Project description
django-odoo-auth
Custom django auth backend for authorization via odoo
Quick start
- install module
pip install django-odoo-auth
- Add odoo_auth to your INSTALLED_APPS setting like this:
INSTALLED_APPS = [
# ...
'odoo_auth',
]
- Add backend to your AUTHENTICATION_BACKENDS setting like this:
AUTHENTICATION_BACKENDS = (
# ...
'odoo_auth.backends.OdooBackend',
)
- Edit the information to connect to your server Odoo in
settings.py
:
ODOO_SERVER_URL = 'https://exmaple.com'
ODOO_SERVER_PORT = 443 # this optional
ODOO_SERVER_DBNAME = 'database'
- Run
python manage.py migrate
to create the odoo_auth models. - For call odoo_auth, use standard authenticate:
from django.contrib.auth import authenticate
user = authenticate(username='username', password='password')
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-odoo-auth-1.0.4.tar.gz
(7.0 kB
view hashes)