Commits

Kevin Chan committed 0bd59ad

Moved _init_tengine and _init_uriconf method to BaseApplication.__init__().

Comments (0)

Files changed (1)

minipy/application.py

         """
         # load web application global settings
         self._load_settings()
+
         # stuff parameters into attributes
         for k, v in kwargs.iteritems():
             if not k.startswith(u'_'):
                 setattr(self, k, v)
 
+        # initialize uri config
+        self._init_uriconf()
+
+        # initialize template engine
+        self._init_tengine()
+        
     def __call__(self, environ, start_response):
         """
         Construct environment and run app.
         """
         self.environ = environ
         self.start_response = start_response
-        self._init_tengine()
         self._init_request()
         self._init_response()
-        self.init_uriconf()
         return self.respond()
 
     def _add_path(self, *paths):