--- a/Allura/allura/config/environment.py
+++ b/Allura/allura/config/environment.py
@@ -1,5 +1,12 @@
 # -*- coding: utf-8 -*-
 """WSGI environment setup for allura."""
+
+import pylons
+import pylons.middleware
+import tg
+import tg.error
+pylons.c = pylons.tmpl_context
+pylons.g = pylons.app_globals
 
 from allura.config.app_cfg import base_config