From c4dd0be8fd6e903693b31a2b6b4c964c283aacc3 Mon Sep 17 00:00:00 2001 From: Daniel W Bond Date: Thu, 20 Aug 2015 15:07:54 -0400 Subject: [PATCH] moved the peoplefinder api url to the settings file --- bookshare/core/cas_callbacks.py | 3 ++- bookshare/settings/settings.py | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/bookshare/core/cas_callbacks.py b/bookshare/core/cas_callbacks.py index 1131a22..2309669 100644 --- a/bookshare/core/cas_callbacks.py +++ b/bookshare/core/cas_callbacks.py @@ -4,11 +4,12 @@ from django.contrib.auth.models import User # third-part imports import requests # imports from your apps +from django.conf import settings from .models import Student def pfinfo(u_name): - pf_url = "http://peoplefinder.b1.akshaykarthik.com/" + pf_url = settings.PF_URL url = str(pf_url) + "basic/all/" + str(u_name) try: metadata = requests.get(url) diff --git a/bookshare/settings/settings.py b/bookshare/settings/settings.py index d58c87f..916c9e0 100644 --- a/bookshare/settings/settings.py +++ b/bookshare/settings/settings.py @@ -112,6 +112,9 @@ AUTHENTICATION_BACKENDS = ( 'cas.backends.CASBackend', ) +# Peoplefinder API for user creation +PF_URL = "http://peoplefinder.b1.akshaykarthik.com/" + CAS_SERVER_URL = 'https://login.gmu.edu' CAS_LOGOUT_COMPLETELY = True CAS_PROVIDE_URL_TO_LOGOUT = True -- GitLab