diff --git a/README b/README index 2b4c5c2..b1b5b28 100644 --- a/README +++ b/README @@ -1,6 +1,6 @@ # Installation - apt-get install libldap2-dev python-dev libmysqlclient-dev + apt-get install libldap2-dev python-dev libmysqlclient-dev libsasl2-dev virtualenv venv . venv/bin/activate pip install -r requirements.txt diff --git a/main/views.py b/main/views.py index 0f221b2..157aba2 100644 --- a/main/views.py +++ b/main/views.py @@ -35,7 +35,7 @@ def index(request): @login_required def profile(request): - username = request.user + username = request.user.username ldap_user = None try: ldap_user = LdapUser.objects.get(username=username) diff --git a/userinfosite/settings-sample.py b/userinfosite/settings-sample.py index 5abf66d..a7b334e 100644 --- a/userinfosite/settings-sample.py +++ b/userinfosite/settings-sample.py @@ -54,6 +54,10 @@ MIDDLEWARE_CLASSES = ( ROOT_URLCONF = 'userinfosite.urls' +TEMPLATE_DIRS = ( + os.path.join(BASE_DIR, 'templates/'), +) + WSGI_APPLICATION = 'userinfosite.wsgi.application' @@ -84,6 +88,14 @@ DATABASES = { 'PASSWORD': '', # Not used with sqlite3. 'HOST': 'localhost', # Set to empty string for localhost. Not used with sqlite3. 'PORT': '', # Set to empty string for default. Not used with sqlite3. + }, + 'inside': { + 'ENGINE': 'django.db.backends.mysql', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'. + 'NAME': 'dev_inside', # Or path to database file if using sqlite3. + 'USER': 'dev', # Not used with sqlite3. + 'PASSWORD': 'dev', # Not used with sqlite3. + 'HOST': 'localhost', # Set to empty string for localhost. Not used with sqlite3. + 'PORT': '', # Set to empty string for default. Not used with sqlite3. } } DATABASE_ROUTERS = ['main.router.Router']