Add xnet.profiles.
[xnet] / xnet / settings / base.py
index 99e7fc7..1025a8f 100644 (file)
@@ -8,8 +8,12 @@ ROOT_DIR = os.path.abspath(os.path.dirname(os.path.dirname(__file__)))
 
 def read_pass(name):
     fname = os.path.join(ROOT_DIR, 'private', name)
-    with open(fname, 'r') as f:
-        return f.readline().strip()
+    try:
+        with open(fname, 'r') as f:
+            return f.readline().strip()
+    except (OSError, IOError) as e:
+        print("Unable to read %s: %s" % (fname, e))
+        return ''
 
 ADMINS = (
     # ('Your Name', 'your_email@example.com'),
@@ -50,7 +54,7 @@ TEMPLATE_CONTEXT_PROCESSORS = (
     'django.core.context_processors.static',
     'django.core.context_processors.tz',
     'django.contrib.messages.context_processors.messages',
-    'xnet.accounts.context_processors.xnet',
+    'xnet.groups.context_processors.xnet',
 )
 
 SITE_ID = 1
@@ -87,7 +91,7 @@ STATIC_URL = '/static/'
 
 # Additional locations of static files
 STATICFILES_DIRS = (
-    os.path.join(ROOT_DIR, 'static'),
+    os.path.join(ROOT_DIR, 'static'),
     # Put strings here, like "/home/html/static" or "C:/www/django/static".
     # Always use forward slashes, even on Windows.
     # Don't forget to use absolute paths, not relative paths.
@@ -116,7 +120,7 @@ MIDDLEWARE_CLASSES = (
     'django.contrib.sessions.middleware.SessionMiddleware',
     'django.middleware.csrf.CsrfViewMiddleware',
     'django.contrib.auth.middleware.AuthenticationMiddleware',
-    'xnet.accounts.middleware.XnetAccountMiddleware',
+    'xnet.groups.middleware.XnetAccountMiddleware',
     'django.contrib.messages.middleware.MessageMiddleware',
     # Uncomment the next line for simple clickjacking protection:
     # 'django.middleware.clickjacking.XFrameOptionsMiddleware',
@@ -145,11 +149,13 @@ INSTALLED_APPS = (
 
     'django_authgroupex',
     'crispy_forms',
-    'xnet.site',
+
     'xnet.accounts',
+    'xnet.site',
+    'xnet.groups',
     'xnet.news',
     'xnet.events',
-    'xnet.example',
+    'xnet.profiles',
 )
 
 # A sample logging configuration. The only tangible logging