SERIALIZATION_MODULES = { 'json': 'wadofstuff.django.serializers.json' } # register our time zone aware user AUTH_PROFILE_MODULE = "openproximity.UserProfile" # load xml settings OPENPROXIMITY = XMLTool('/etc/openproximity2/settings.xml') # when logged in just send the user back to the main page LOGIN_REDIRECT_URL = "/" logger.info("starting up plugins") pluginsystem.find_plugins() for plugin in pluginsystem.get_plugins('django'): if plugin.provides.get('TEMPLATE_DIRS', None) is not None : TEMPLATE_DIRS += ( os.path.join(plugin.path, plugin.provides['TEMPLATE_DIRS']), ) if plugin.provides.get('LOCALE_PATHS', None) is not None: LOCALE_PATHS += ( os.path.join(plugin.path, plugin.provides['LOCALE_PATHS']), ) if plugin.provides.get('django_app', False): INSTALLED_APPS += (plugin.name,) logger.info("starting up plugin providers") for plugin in pluginsystem.get_plugins('plugin_provider'): for plug in pluginsystem.get_plugins(plugin.provides['plugin_provider_name']): INSTALLED_APPS += (plug.name, ) logger.info("plugin system initied") logger.info("settings.py loaded")
# This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along # with this program; if not, write to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. from preset import * # keep a reference to the parser __CONFIGGLUE_PARSER__ = parser from net.aircable.openproximity.pluginsystem import pluginsystem pluginsystem.find_plugins(locals()['OP_PLUGINS']) import plug for k in dir(plug): if not k.isupper(): continue locals()[k].extend(getattr(plug, k)) orig=parser.get('django', k.lower()) orig.extend(getattr(plug, k)) parser.set('django', k.lower(), orig) if not os.access(locals()['STORE_PATH'], os.W_OK): locals()['STORE_PATH'] = os.path.expanduser("~/.openproximity") # make sure we don't get loaded again! sys.modules['django-web.settings'] = sys.modules[__name__]
# This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along # with this program; if not, write to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. from preset import * # keep a reference to the parser __CONFIGGLUE_PARSER__ = parser from net.aircable.openproximity.pluginsystem import pluginsystem pluginsystem.find_plugins(locals()['OP2_PLUGINS']) import plug for k in dir(plug): if not k.isupper(): continue locals()[k].extend(getattr(plug, k)) orig = parser.get('django', k.lower()) orig.extend(getattr(plug, k)) parser.set('django', k.lower(), orig) # make sure we don't get loaded again! sys.modules['django-web.settings'] = sys.modules['settings'] def __get_match_dongle(options, address):