2016-02-11 20:24:34 +00:00
.. _installation:
Installation
############
Requirements
============
2017-07-11 05:29:24 +00:00
* Python: `` 2.7 `` `` 3.4 `` `` 3.5 `` `` 3.6 ``
2018-04-20 15:29:48 +00:00
* Django: `` 1.8 `` `` 1.9 `` `` 1.10 `` `` 1.11 `` `` 2.0 ``
2016-02-11 20:24:34 +00:00
Quick Installation
==================
2018-05-28 15:50:03 +00:00
If you want to get started fast see our `` /example `` folder in your local installation. Or look at it `on github <https://github.com/juanifioren/django-oidc-provider/tree/master/example> `_ .
2016-02-11 20:24:34 +00:00
Install the package using pip::
$ pip install django-oidc-provider
2017-12-14 17:30:46 +00:00
Add it to your apps in your project's django settings::
2016-02-11 20:24:34 +00:00
INSTALLED_APPS = (
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'oidc_provider',
# ...
)
2017-12-14 17:30:46 +00:00
Include our urls to your project's `` urls.py `` ::
2016-02-11 20:24:34 +00:00
urlpatterns = patterns('',
# ...
url(r'^openid/', include('oidc_provider.urls', namespace='oidc_provider')),
# ...
)
2017-12-14 17:30:46 +00:00
Run the migrations and generate a server RSA key::
2016-02-11 20:24:34 +00:00
$ python manage.py migrate
2016-10-05 17:18:38 +00:00
$ python manage.py creatersakey
2016-02-11 20:24:34 +00:00
2017-12-14 17:30:46 +00:00
Add this required variable to your project's django settings::
2016-02-11 20:24:34 +00:00
LOGIN_URL = '/accounts/login/'