Permalink
Browse files

Merge branch 'photos'

  • Loading branch information...
2 parents de47b67 + 1342383 commit 2ff6986544ffbf6645935345a87e6acd514b17cc @davedash davedash committed Sep 1, 2011
View
@@ -21,3 +21,4 @@ puppet/cache/*
puppet/manifests/build/
vagrantconfig_local.yaml
docs/_build
+settings/*local.py
View
@@ -1,10 +1,22 @@
# -*- coding: utf-8 -*-
import sys, os
-# If extensions (or modules to document with autodoc) are in another directory,
-# add these directories to sys.path here. If the directory is relative to the
-# documentation root, use os.path.abspath to make it absolute, like shown here.
-#sys.path.insert(0, os.path.abspath('.'))
+sys.path.insert(0, os.path.abspath('..'))
+
+
+class Mock(object):
+ def __init__(self, *args):
+ pass
+
+ def __getattr__(self, name):
+ return Mock
+
+for mod_name in ('ldap', '_ldap', 'django_auth_ldap', 'django_auth_ldap.config'):
+ sys.modules[mod_name] = Mock()
+
+import funfactory.manage
+funfactory.manage.ROOT = os.path.abspath('..')
+
# -- General configuration -----------------------------------------------------
@@ -13,7 +25,7 @@
# Add any Sphinx extension module names here, as strings. They can be extensions
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
-extensions = ['sphinx.ext.intersphinx']
+extensions = ['sphinx.ext.intersphinx', 'sphinx.ext.autodoc']
# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
View
@@ -21,6 +21,7 @@ Contents:
:maxdepth: 2
installation
+ settings
sessions
registration
invites
View
@@ -0,0 +1,16 @@
+========
+Settings
+========
+
+Pre-requisite Settings
+----------------------
+
+.. automodule:: settings.pre
+ :members:
+
+
+Standard Settings
+-----------------
+
+.. automodule:: settings.default
+ :members:
@@ -0,0 +1,8 @@
+from funfactory.settings_base import *
+from settings.initial import *
+from settings.default import *
+
+try:
+ from settings.local import *
+except ImportError:
+ pass
@@ -2,10 +2,13 @@
# Django settings for the mozillians project.
import ldap
+import logging
from django_auth_ldap.config import _LDAPConfig, LDAPSearch
-from funfactory.settings_base import *
+from funfactory.manage import path
+from funfactory import settings_base as base
+from settings import initial as pre
## Log settings
SYSLOG_TAG = "http_app_mozillians"
@@ -56,7 +59,7 @@
}
-MIDDLEWARE_CLASSES = list(MIDDLEWARE_CLASSES) + [
+MIDDLEWARE_CLASSES = list(base.MIDDLEWARE_CLASSES) + [
'larper.middleware.LarperMiddleware',
]
@@ -79,7 +82,7 @@
AUTH_LDAP_ALWAYS_UPDATE_USER = False
-INSTALLED_APPS = list(INSTALLED_APPS) + [
+INSTALLED_APPS = list(base.INSTALLED_APPS) + [
'landing',
'phonebook',
'users',
@@ -118,3 +121,10 @@
}
}
+#: Userpics will be uploaded here.
+USERPICS_PATH = pre.NETAPP_STORAGE + '/userpics'
+
+#: Userpics will accessed here.
+USERPICS_URL = pre.UPLOAD_URL + '/userpics'
+
+
View
@@ -0,0 +1,23 @@
+"""
+:py:mod:`settings.pre` contains settings that IT will usually override.
+
+The overrides can happen in :py:mod:`settings.pre_local`.
+
+Settings in :py:mod:`settings.default` and :py:mod:`settings.local` depend on
+these.
+"""
+
+from funfactory.manage import path
+
+#: This is the location of a share used on multiple nodes. This is a perfect
+#: place to store uploaded assets that are shared across webheads.
+NETAPP_STORAGE = path('tmp')
+
+#: Base URL for uploaded files. Could be a CDN.
+UPLOAD_URL = '/uploads'
+
+try:
+ from settings.pre_local import *
+except ImportError:
+ pass
+
File renamed without changes.

0 comments on commit 2ff6986

Please sign in to comment.