-
Notifications
You must be signed in to change notification settings - Fork 0
Creating Your Sensible App
h0pbeat edited this page Aug 13, 2013
·
12 revisions
- Create empty django project.
- Inside clone this repository (django-sensible).
git clone [email protected]:MIT-Model-Open-Data-and-Identity-System/django-sensible.git django_sensible
- Edit wsgi.py if running on apache2
- Make templates directory
- Copy everything from django_sensible templates_to_copy to templates
cp -r django_sensible/templates_to_copy/* templates/
- Add
import django_sensible.settings
to settings.py file - Add
'django_sensible'
to INSTALLED_APPS - Add
INSTALLED_APPS += django_sensible.settings.INSTALLED_APPS
- Add django_sensible settings:
SERVICE_URL = django_sensible.settings.SERVICE_URL
CONNECTOR = django_sensible.settings.CONNECTOR
SERVICE_TOKEN_URL = django_sensible.settings.SERVICE_TOKEN_URL
SERVICE_REFRESH_TOKEN_URL = django_sensible.settings.SERVICE_REFRESH_TOKEN_URL
SERVICE_MY_REDIRECT = SENSIBLE_URL+django_sensible.settings.IDP_MY_REDIRECT_SUFFIX
AUTH_ENDPOINT = django_sensible.settings.AUTH_ENDPOINT
IDP_URL = django_sensible.settings.IDP_URL
IDP_AUTHORIZATION_URL = django_sensible.settings.IDP_AUTHORIZATION_URL
SERVICE_MY_REDIRECT = SENSIBLE_URL + django_sensible.settings.SERVICE_MY_REDIRECT_SUFFIX
IDP_MY_REDIRECT = SENSIBLE_URL+django_sensible.settings.IDP_MY_REDIRECT_SUFFIX
LOGIN_URL = SENSIBLE_URL + django_sensible.settings.LOGIN_URL_SUFFIX
LOGIN_REDIRECT_URL = ROOT_URL
OPENID_SSO_SERVER_URL = django_sensible.settings.OPENID_SSO_SERVER_URL
OPENID_USE_EMAIL_FOR_USERNAME = django_sensible.settings.OPENID_USE_EMAIL_FOR_USERNAME
AUTHENTICATION_BACKENDS = django_sensible.settings.AUTHENTICATION_BACKENDS
OPENID_CREATE_USERS = django_sensible.settings.OPENID_CREATE_USERS
OPENID_UPDATE_DETAILS_FROM_SREG = django_sensible.settings.OPENID_UPDATE_DETAILS_FROM_SREG
OPENID_RENDER_FAILURE = django_sensible.settings.OPENID_RENDER_FAILURE
- Modify django_sensible/settings.py to reflect your setup (urls)
- create LOCAL_settings.py in the same location where your settings.py are; we will keep installation specific settings there
- insert into LOCAL_settings. py (tbc).