[z3-checkins] r36876 - in z3/deliverance/DeliveranceVHoster/trunk/dvhoster: . controllers tests tests/functional
ianb at codespeak.net
ianb at codespeak.net
Wed Jan 17 16:04:27 CET 2007
Author: ianb
Date: Wed Jan 17 16:04:19 2007
New Revision: 36876
Modified:
z3/deliverance/DeliveranceVHoster/trunk/dvhoster/__init__.py
z3/deliverance/DeliveranceVHoster/trunk/dvhoster/controllers/__init__.py
z3/deliverance/DeliveranceVHoster/trunk/dvhoster/controllers/index.py
z3/deliverance/DeliveranceVHoster/trunk/dvhoster/controllers/remote_getter.py
z3/deliverance/DeliveranceVHoster/trunk/dvhoster/debuginterp.py
z3/deliverance/DeliveranceVHoster/trunk/dvhoster/dispatcher.py
z3/deliverance/DeliveranceVHoster/trunk/dvhoster/tests/__init__.py
z3/deliverance/DeliveranceVHoster/trunk/dvhoster/tests/functional/test_index.py
z3/deliverance/DeliveranceVHoster/trunk/dvhoster/tests/functional/test_remote_getter.py
z3/deliverance/DeliveranceVHoster/trunk/dvhoster/wsgiapp.py
Log:
Python code renaming
Modified: z3/deliverance/DeliveranceVHoster/trunk/dvhoster/__init__.py
==============================================================================
--- z3/deliverance/DeliveranceVHoster/trunk/dvhoster/__init__.py (original)
+++ z3/deliverance/DeliveranceVHoster/trunk/dvhoster/__init__.py Wed Jan 17 16:04:19 2007
@@ -1,7 +1,7 @@
"""
-ddemo
+dvhoster
-This file loads the finished app from ddemo.config.middleware.
+This file loads the finished app from dvhoster.config.middleware.
"""
@@ -12,4 +12,4 @@
current_environ = registry.StackedObjectProxy(
name='environ')
-from ddemo.wsgiapp import make_app
+from dvhoster.wsgiapp import make_app
Modified: z3/deliverance/DeliveranceVHoster/trunk/dvhoster/controllers/__init__.py
==============================================================================
--- z3/deliverance/DeliveranceVHoster/trunk/dvhoster/controllers/__init__.py (original)
+++ z3/deliverance/DeliveranceVHoster/trunk/dvhoster/controllers/__init__.py Wed Jan 17 16:04:19 2007
@@ -4,14 +4,14 @@
from pylons.templating import render, render_response
from pylons.helpers import abort, redirect_to, etag_cache
from paste.deploy import CONFIG
-import ddemo.helpers as h
+import dvhoster.helpers as h
class BaseController(WSGIController):
def __call__(self, environ, start_response):
# Insert any code to be run per request here. The Routes match
# is under environ['pylons.routes_dict'] should you want to check
# the action or route vars here
- di = c.domain_info = environ['ddemo.domain_info']
+ di = c.domain_info = environ['dvhoster.domain_info']
if not di.initialized:
di.initialize()
return WSGIController.__call__(self, environ, start_response)
Modified: z3/deliverance/DeliveranceVHoster/trunk/dvhoster/controllers/index.py
==============================================================================
--- z3/deliverance/DeliveranceVHoster/trunk/dvhoster/controllers/index.py (original)
+++ z3/deliverance/DeliveranceVHoster/trunk/dvhoster/controllers/index.py Wed Jan 17 16:04:19 2007
@@ -1,4 +1,4 @@
-from ddemo.controllers import *
+from dvhoster.controllers import *
import os
import re
import urlparse
@@ -57,7 +57,7 @@
def update(self):
params = request.params
conf = CONFIG['app_conf']
- base = request.environ['ddemo.base_url']
+ base = request.environ['dvhoster.base_url']
di = c.domain_info
base_parts = urlparse.urlsplit(base)
scheme, netloc, path, query, fragment = base_parts
Modified: z3/deliverance/DeliveranceVHoster/trunk/dvhoster/controllers/remote_getter.py
==============================================================================
--- z3/deliverance/DeliveranceVHoster/trunk/dvhoster/controllers/remote_getter.py (original)
+++ z3/deliverance/DeliveranceVHoster/trunk/dvhoster/controllers/remote_getter.py Wed Jan 17 16:04:19 2007
@@ -1,4 +1,4 @@
-from ddemo.controllers import *
+from dvhoster.controllers import *
from httpencode.lxmlformat import xml as lxml_format
from httpencode.json import json as json_format
from httpencode import BadRequestError
Modified: z3/deliverance/DeliveranceVHoster/trunk/dvhoster/debuginterp.py
==============================================================================
--- z3/deliverance/DeliveranceVHoster/trunk/dvhoster/debuginterp.py (original)
+++ z3/deliverance/DeliveranceVHoster/trunk/dvhoster/debuginterp.py Wed Jan 17 16:04:19 2007
@@ -1,7 +1,7 @@
from deliverance.interpreter import Renderer as PyRenderer
from lxml import etree
from paste.request import construct_url
-from ddemo import current_environ
+from dvhoster import current_environ
class Renderer(PyRenderer):
@@ -14,9 +14,9 @@
error.text = 'Error with no message (%s)' % message
error_container = etree.Element('div')
error_container.attrib['style'] = self.error_style
- if not current_environ.get('ddemo.has_errors'):
- current_environ['ddemo.has_errors'] = True
- domain_info = current_environ['ddemo.domain_info']
+ if not current_environ.get('dvhoster.has_errors'):
+ current_environ['dvhoster.has_errors'] = True
+ domain_info = current_environ['dvhoster.domain_info']
remote = domain_info.remote
remote += current_environ.get('PATH_INFO', '')
if current_environ.get('QUERY_STRING'):
Modified: z3/deliverance/DeliveranceVHoster/trunk/dvhoster/dispatcher.py
==============================================================================
--- z3/deliverance/DeliveranceVHoster/trunk/dvhoster/dispatcher.py (original)
+++ z3/deliverance/DeliveranceVHoster/trunk/dvhoster/dispatcher.py Wed Jan 17 16:04:19 2007
@@ -8,9 +8,9 @@
from wsgifilter import proxyapp
from wsgifilter import relocateresponse
from deliverance.wsgimiddleware import DeliveranceMiddleware
-from ddemo.dataprovider import DataProvider
-from ddemo import current_environ
-from ddemo.debuginterp import Renderer
+from dvhoster.dataprovider import DataProvider
+from dvhoster import current_environ
+from dvhoster.debuginterp import Renderer
def norm_path(urlpath):
if not urlpath:
@@ -34,8 +34,8 @@
if ':' in domain:
domain = domain.split(':', 1)[0]
domain_info = self.provider.domain(domain)
- environ['ddemo.domain_info'] = domain_info
- environ['ddemo.base_url'] = construct_url(
+ environ['dvhoster.domain_info'] = domain_info
+ environ['dvhoster.base_url'] = construct_url(
environ, with_query_string=False,
path_info='')
path_info = norm_path(environ.get('PATH_INFO', ''))
Modified: z3/deliverance/DeliveranceVHoster/trunk/dvhoster/tests/__init__.py
==============================================================================
--- z3/deliverance/DeliveranceVHoster/trunk/dvhoster/tests/__init__.py (original)
+++ z3/deliverance/DeliveranceVHoster/trunk/dvhoster/tests/__init__.py Wed Jan 17 16:04:19 2007
@@ -16,7 +16,7 @@
from paste.deploy import loadapp
import paste.fixture
-from ddemo.config.routing import *
+from dvhoster.config.routing import *
from routes import request_config, url_for
class TestController(TestCase):
Modified: z3/deliverance/DeliveranceVHoster/trunk/dvhoster/tests/functional/test_index.py
==============================================================================
--- z3/deliverance/DeliveranceVHoster/trunk/dvhoster/tests/functional/test_index.py (original)
+++ z3/deliverance/DeliveranceVHoster/trunk/dvhoster/tests/functional/test_index.py Wed Jan 17 16:04:19 2007
@@ -1,6 +1,6 @@
-from ddemo.tests import *
+from dvhoster.tests import *
class TestIndexController(TestController):
def test_index(self):
response = self.app.get(url_for(controller='index'))
- # Test response...
\ No newline at end of file
+ # Test response...
Modified: z3/deliverance/DeliveranceVHoster/trunk/dvhoster/tests/functional/test_remote_getter.py
==============================================================================
--- z3/deliverance/DeliveranceVHoster/trunk/dvhoster/tests/functional/test_remote_getter.py (original)
+++ z3/deliverance/DeliveranceVHoster/trunk/dvhoster/tests/functional/test_remote_getter.py Wed Jan 17 16:04:19 2007
@@ -1,6 +1,6 @@
-from ddemo.tests import *
+from dvhoster.tests import *
class TestRemoteGetterController(TestController):
def test_index(self):
response = self.app.get(url_for(controller='remote_getter'))
- # Test response...
\ No newline at end of file
+ # Test response...
Modified: z3/deliverance/DeliveranceVHoster/trunk/dvhoster/wsgiapp.py
==============================================================================
--- z3/deliverance/DeliveranceVHoster/trunk/dvhoster/wsgiapp.py (original)
+++ z3/deliverance/DeliveranceVHoster/trunk/dvhoster/wsgiapp.py Wed Jan 17 16:04:19 2007
@@ -14,10 +14,10 @@
from pylons.error import error_template
from pylons.middleware import ErrorHandler, ErrorDocuments, StaticJavascripts, error_mapper
-import ddemo.helpers
-from ddemo.routing import make_map
+import dvhoster.helpers
+from dvhoster.routing import make_map
-from ddemo.dispatcher import DeliveranceDispatcher
+from dvhoster.dispatcher import DeliveranceDispatcher
def load_environment(global_conf={}, app_conf={}):
map = make_map(global_conf, app_conf)
@@ -38,10 +38,10 @@
"""Create a WSGI application and return it"""
# Load our Pylons configuration defaults
config = load_environment(global_conf, app_conf)
- config.init_app(global_conf, app_conf, package='ddemo')
+ config.init_app(global_conf, app_conf, package='dvhoster')
# Load our default Pylons WSGI app and make g available
- app = pylons.wsgiapp.PylonsApp(config, helpers=ddemo.helpers, g=Globals)
+ app = pylons.wsgiapp.PylonsApp(config, helpers=dvhoster.helpers, g=Globals)
g = app.globals
app = ConfigMiddleware(app, {'app_conf':app_conf,
'global_conf':global_conf})
More information about the z3-checkins
mailing list