from pyramid.config import Configurator
from mist.io.resources import Root

def main(global_config, **settings):
    """ This function returns a Pyramid WSGI application.
    """
    config = Configurator(root_factory=Root, settings=settings)
    config.add_static_view('static', 'mist.io:static')
    config.add_route('home', '/',
                     view='mist.io.views.home',
                     view_renderer='templates/home.pt')

    config.add_route('machines', '/machines',
                     view='mist.io.views.machines',
                     view_renderer='templates/machines.pt')

    config.add_route('disks', '/disks',
                     view='mist.io.views.disks',
                     view_renderer='templates/disks.pt')

    config.add_route('images', '/images',
                     view='mist.io.views.images',
                     view_renderer='templates/images.pt')

    config.add_route('networks', '/networks',
                     view='mist.io.views.network',
                     view_renderer='templates/network.pt')
    
    config.add_route('backends', '/backends/{backend}/machines/list',
                     view='mist.io.views.list_machines')
    return config.make_wsgi_app()


@@ -236,16 +236,17 @@
 ttings)%0A
+%0A
     conf
@@ -292,16 +292,17 @@
 tatic')%0A
+%0A
     conf
@@ -329,36 +329,30 @@
  '/'
-,
+)
 %0A    
-                 
+config.add_
 view
-=
+(
 'mis
@@ -368,16 +368,17 @@
 s.home',
+ 
 %0A       
@@ -382,38 +382,72 @@
                 
- view_
+route_name='home', %0A                    
 renderer='templa
@@ -509,36 +509,30 @@
 nes'
-,
+)
 %0A    
-                 
+config.add_
 view
-=
+(
 'mis
@@ -565,38 +565,75 @@
                 
- view_
+route_name='machines',%0A                    
 renderer='templa
@@ -693,36 +693,30 @@
 sks'
-,
+)
 %0A    
-                 
+config.add_
 view
-=
+(
 'mis
@@ -746,38 +746,72 @@
                 
- view_
+route_name='disks',%0A                    
 renderer='templa
@@ -870,36 +870,30 @@
 ges'
-,
+)
 %0A    
-                 
+config.add_
 view
-=
+(
 'mis
@@ -924,38 +924,73 @@
                 
- view_
+route_name='images',%0A                    
 renderer='templa
@@ -1054,36 +1054,30 @@
 rks'
-,
+)
 %0A    
-                 
+config.add_
 view
-=
+(
 'mis
@@ -1121,14 +1121,51 @@
     
- view_
+route_name='networks',%0A                    
 rend
@@ -1270,36 +1270,30 @@
 ist'
-,%0A                     
+)%0A    config.add_
 view
-=
+(
 'mis
@@ -1313,25 +1313,69 @@
 st_machines'
-)
+,%0A                    route_name='backends')%0A
 %0A    return 

add new style routes and view linking