示例#1
0
 def test_local_settings(self):
     settings = TestSettings()
     import_local_settings(settings, __file__, "test_settings.py")
     self.assertEquals(settings.default, "default")
     self.assertEquals(settings.overridden, "overridden")
 def test_local_settings(self):
     settings = TestSettings()
     from rapidsms.manager import import_local_settings
     import_local_settings(settings, __file__, "test_settings.py")
     self.assertEquals(settings.default, "default")
     self.assertEquals(settings.overridden, "overridden")
示例#3
0
 def test_local_settings(self):
     settings = TestSettings()
     import_local_settings(settings, __file__, "test_settings.py")
     self.assertEquals(settings.default, "default")
     self.assertEquals(settings.overridden, "overridden")
示例#4
0
 def test_local_settings (self):
     settings = TestSettings()
     from rapidsms.manager import import_local_settings
     import_local_settings(settings, __file__, "test_settings.py")
     self.assertEquals(settings.default, "default")
     self.assertEquals(settings.overridden, "overridden")
示例#5
0
# vim: ai ts=4 sts=4 et sw=4 coding=utf-8
# maintainer: dgelvin

import os
import sys

import django.core.handlers.wsgi


filedir = os.path.dirname(__file__)  # this is in the rapidsms directory
rootpath = "/home/mvp/find_tb/sms"

# load rapidsms config
os.environ['RAPIDSMS_INI'] = os.path.join(rootpath, 'local.ini')
from rapidsms.webui import settings

# set rapidsms config as django config
os.environ['DJANGO_SETTINGS_MODULE'] = 'rapidsms.webui.settings'

# set rapidsms home
os.environ["RAPIDSMS_HOME"] = rootpath

# add non-rapidsms django apps
#from django.conf import settings
#settings.INSTALLED_APPS.extend(['reversion'])

from rapidsms import manager
manager.import_local_settings(settings, os.environ['RAPIDSMS_INI'])
# create WSGI handler
application = django.core.handlers.wsgi.WSGIHandler()