From 3fcf1456df439fb4c7699e9773212605606d69f7 Mon Sep 17 00:00:00 2001 From: portnov Date: Thu, 12 Jun 2008 15:56:15 +0600 Subject: [PATCH] Unlink HMS with django's settings: Remove call of modules.init() from hms.py and remove explicit import of settings module from modules.py. So, now importer module must call hms.modules.init() after import. To make HMS use django's settings, importer can explicitly add "settings" attribute to modules module and append "settings" to hms.modules.exports before calling hms.modules.init(). --- hms.py | 1 - modules.py | 5 +---- 2 files changed, 1 insertions(+), 5 deletions(-) diff --git a/hms.py b/hms.py index 73b7380..46e4d11 100644 --- a/hms.py +++ b/hms.py @@ -2,4 +2,3 @@ import modules from hooks import * from generate import * -modules.init() diff --git a/modules.py b/modules.py index 62650d4..61e1db7 100644 --- a/modules.py +++ b/modules.py @@ -10,15 +10,12 @@ import sys import os from os.path import dirname,join -sys.path.append(dirname(dirname(dirname(__file__)))) -import settings - from hooks import * from generate import * MODS_DIR = "modules" modules = [] -exports = ['settings','export', 'export_as', 'hook', 'intercept', +exports = ['export', 'export_as', 'hook', 'intercept', 'generates', 'generate', 'Generated'] def export(func): -- 1.7.2.3