fix broken config, and no more static method for Config (which now is a singleton)
[myslice.git] / portal / homeview.py
index fb01240..960c8f0 100644 (file)
@@ -7,14 +7,16 @@ from django.template import RequestContext
 from django.shortcuts import render_to_response
 
 from manifold.manifoldresult import ManifoldResult
-from myslice.viewutils import topmenu_items, the_user
+from ui.topmenu import topmenu_items, the_user
 from myslice.config import Config
 
 class HomeView (View):
 
+    # expose this so we can mention the backend URL on the welcome page
     def default_env (self):
+        config=Config()
         return { 
-                 'manifold_url':Config.manifold_url,
+                 'MANIFOLD_URL':config.manifold_url(),
                  }
 
     def post (self,request):
@@ -55,7 +57,7 @@ class HomeView (View):
     def get (self, request, state=None):
         env = self.default_env()
         env['username']=the_user(request)
-        env['topmenu_items'] = topmenu_items('', request)
+        env['topmenu_items'] = topmenu_items(None, request)
         if state: env['state'] = state
         elif not env['username']: env['state'] = "Please sign in"
         return render_to_response('home-view.html',env, context_instance=RequestContext(request))