Skip to content

Creating Your Sensible App

h0pbeat edited this page Aug 13, 2013 · 12 revisions
  1. Create empty django project.
  2. Inside clone this repository (django-sensible). git clone [email protected]:MIT-Model-Open-Data-and-Identity-System/django-sensible.git django_sensible
  3. Edit wsgi.py if running on apache2
  4. Make templates directory
  5. Copy everything from django_sensible templates_to_copy to templates cp -r django_sensible/templates_to_copy/* templates/
  6. Add import django_sensible.settings to settings.py file
  7. Add 'django_sensible' to INSTALLED_APPS
  8. Add INSTALLED_APPS += django_sensible.settings.INSTALLED_APPS
  9. 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
  1. Modify django_sensible/settings.py to reflect your setup (urls)
  2. create LOCAL_settings.py in the same location where your settings.py are; we will keep installation specific settings there
  3. insert into LOCAL_settings. py (tbc).
Clone this wiki locally