Permalink
Browse files

Update ComplexApplication initialization ordering again

  • Loading branch information...
1 parent f08cc30 commit 1a5cccb6376c96934a3128b934263aedc86e9ba5 @GrAndSE committed May 10, 2012
Showing with 2 additions and 1 deletion.
  1. +2 −1 lighty/wsgi/__init__.py
@@ -33,7 +33,6 @@ class ComplexApplication(BaseApplication):
'''
def __init__(self, settings):
- super(ComplexApplication, self).__init__(settings)
# get databse connections
for section in settings.sections():
if section.startswith('DATABASE:'):
@@ -52,6 +51,8 @@ def __init__(self, settings):
if settings.has_section('TEMPLATE_DIRS'):
template_dirs += settings.section_options('TEMPLATE_DIRS')
self.template_loader = FSLoader(template_dirs)
+ # Finish initialization here to prevent database import errors
+ super(ComplexApplication, self).__init__(settings)
def get_template(self, name):
'''Get template for name

0 comments on commit 1a5cccb

Please sign in to comment.