[xiph-commits] r3845 - in arkaiv/trunk: arkaiv/config arkaiv/controllers arkaiv/lib arkaiv/model data/templates

dcrowdy at svn.annodex.net dcrowdy at svn.annodex.net
Wed Jan 21 18:46:06 PST 2009


Author: dcrowdy
Date: 2009-01-21 18:46:05 -0800 (Wed, 21 Jan 2009)
New Revision: 3845

Modified:
   arkaiv/trunk/arkaiv/config/middleware.py
   arkaiv/trunk/arkaiv/config/middleware.pyc
   arkaiv/trunk/arkaiv/controllers/__init__.pyc
   arkaiv/trunk/arkaiv/controllers/error.pyc
   arkaiv/trunk/arkaiv/controllers/page.pyc
   arkaiv/trunk/arkaiv/lib/base.pyc
   arkaiv/trunk/arkaiv/model/cmmlparser.pyc
   arkaiv/trunk/arkaiv/model/oggzinfo.pyc
   arkaiv/trunk/data/templates/autohandler.py
   arkaiv/trunk/data/templates/autohandler.pyc
   arkaiv/trunk/data/templates/mainpage.mak.py
   arkaiv/trunk/data/templates/mainpage.mak.pyc
Log:
Starting the process of compatibility with pylons 0.9.7; middleware.py routing sorted


Modified: arkaiv/trunk/arkaiv/config/middleware.py
===================================================================
--- arkaiv/trunk/arkaiv/config/middleware.py	2009-01-22 02:26:07 UTC (rev 3844)
+++ arkaiv/trunk/arkaiv/config/middleware.py	2009-01-22 02:46:05 UTC (rev 3845)
@@ -38,6 +38,14 @@
     # CUSTOM MIDDLEWARE HERE (filtered by the error handling middlewares)
   #  import authkit.authenticate
   #  app = authkit.authenticate.middleware(app, app_conf)
+    import pylons
+    if pylons.__version__ >= "0.9.7":
+        # Routing/Session/Cache Middleware
+        from beaker.middleware import CacheMiddleware, SessionMiddleware
+        from routes.middleware import RoutesMiddleware
+        app = RoutesMiddleware(app, config['routes.map'])
+        app = SessionMiddleware(app, config)
+        app = CacheMiddleware(app, config)
 
     if asbool(full_stack):
         # Handle Python exceptions

Modified: arkaiv/trunk/arkaiv/config/middleware.pyc
===================================================================
(Binary files differ)

Modified: arkaiv/trunk/arkaiv/controllers/__init__.pyc
===================================================================
(Binary files differ)

Modified: arkaiv/trunk/arkaiv/controllers/error.pyc
===================================================================
(Binary files differ)

Modified: arkaiv/trunk/arkaiv/controllers/page.pyc
===================================================================
(Binary files differ)

Modified: arkaiv/trunk/arkaiv/lib/base.pyc
===================================================================
(Binary files differ)

Modified: arkaiv/trunk/arkaiv/model/cmmlparser.pyc
===================================================================
(Binary files differ)

Modified: arkaiv/trunk/arkaiv/model/oggzinfo.pyc
===================================================================
(Binary files differ)

Modified: arkaiv/trunk/data/templates/autohandler.py
===================================================================
--- arkaiv/trunk/data/templates/autohandler.py	2009-01-22 02:26:07 UTC (rev 3844)
+++ arkaiv/trunk/data/templates/autohandler.py	2009-01-22 02:46:05 UTC (rev 3845)
@@ -1,8 +1,10 @@
 from mako import runtime, filters, cache
 UNDEFINED = runtime.UNDEFINED
-_magic_number = 2
-_modified_time = 1193360629.749054
-_template_filename=u'/home/dcrowdy/src/arkaiv/arkaiv/trunk/arkaiv/templates/autohandler'
+__M_dict_builtin = dict
+__M_locals_builtin = locals
+_magic_number = 5
+_modified_time = 1232592201.692858
+_template_filename=u'/home/dcrowdy/src/arkaiv/trunk/arkaiv/templates/autohandler'
 _template_uri=u'/autohandler'
 _template_cache=cache.Cache(__name__, _modified_time)
 _source_encoding=None
@@ -10,45 +12,46 @@
 
 
 def render_body(context,**pageargs):
-    context.caller_stack.push_frame()
+    context.caller_stack._push_frame()
     try:
-        __M_locals = dict(pageargs=pageargs)
+        __M_locals = __M_dict_builtin(pageargs=pageargs)
         h = context.get('h', UNDEFINED)
         next = context.get('next', UNDEFINED)
+        __M_writer = context.writer()
         # SOURCE LINE 1
-        context.write(u'<html>\n    <head>\n        <title>Arkaiv</title>\n            <link rel="stylesheet" href="/quick.css"></link>\n')
+        __M_writer(u'<html>\n    <head>\n        <title>Arkaiv</title>\n            <link rel="stylesheet" href="/quick.css"></link>\n')
         # SOURCE LINE 5
-        context.write(unicode( h.javascript_include_tag('/javascripts/effects.js', builtins=True) ))
-        context.write(u' \n\n    </head>\n    <body onkeypress=\'keyPressed(event)\'>\n<p class="header">\n<h1>Arkaiv</h1>\n<div id="navcontainer">\n<ul id="navlist">\n  <li>')
+        __M_writer(unicode( h.javascript_include_tag('/javascripts/effects.js', builtins=True) ))
+        __M_writer(u' \n\n    </head>\n    <body onkeypress=\'keyPressed(event)\'>\n<p class="header">\n<h1>Arkaiv</h1>\n<div id="navcontainer">\n<ul id="navlist">\n  <li>')
         # SOURCE LINE 13
-        context.write(unicode( h.link_to("All Items", h.url(action="mainpage")) ))
-        context.write(u'</li>\n  <li>')
+        __M_writer(unicode( h.link_to("All Items", h.url(action="mainpage")) ))
+        __M_writer(u'</li>\n  <li>')
         # SOURCE LINE 14
-        context.write(unicode( h.link_to("Collections", h.url(action="collections")) ))
-        context.write(u'</li>\n  <li>')
+        __M_writer(unicode( h.link_to("Collections", h.url(action="collections")) ))
+        __M_writer(u'</li>\n  <li>')
         # SOURCE LINE 15
-        context.write(unicode( h.link_to("Add media", h.url(action="addannodexform")) ))
-        context.write(u'</li>\n  <li>')
+        __M_writer(unicode( h.link_to("Add media", h.url(action="addannodexform")) ))
+        __M_writer(u'</li>\n  <li>')
         # SOURCE LINE 16
-        context.write(unicode( h.link_to("Playlists", h.url(action="playlistpage")) ))
-        context.write(u'</li>\n  <li>')
+        __M_writer(unicode( h.link_to("Playlists", h.url(action="playlistpage")) ))
+        __M_writer(u'</li>\n  <li>')
         # SOURCE LINE 17
-        context.write(unicode( h.link_to("Help", h.url(action="displayhelp")) ))
-        context.write(u'</li>\n  <li><span class="searchpadding">\n')
+        __M_writer(unicode( h.link_to("Help", h.url(action="displayhelp")) ))
+        __M_writer(u'</li>\n  <li><span class="searchpadding">\n')
         # SOURCE LINE 19
-        context.write(unicode( h.form(h.url(action='search'), multipart=True) ))
-        context.write(u'\n')
+        __M_writer(unicode( h.form(h.url(action='search'), multipart=True) ))
+        __M_writer(u'\n')
         # SOURCE LINE 20
-        context.write(unicode( h.text_field('searchterms', value="Search") ))
-        context.write(u' \n')
+        __M_writer(unicode( h.text_field('searchterms', value="Search") ))
+        __M_writer(u' \n')
         # SOURCE LINE 21
-        context.write(unicode( h.end_form() ))
-        context.write(u' \n  </span>\n  </li>\n</ul>\n</div>\n</p>\n\n        <!--div class="content"-->\n')
+        __M_writer(unicode( h.end_form() ))
+        __M_writer(u' \n  </span>\n  </li>\n</ul>\n</div>\n</p>\n\n        <!--div class="content"-->\n')
         # SOURCE LINE 29
-        context.write(unicode(next.body()))
-        context.write(u'\n        <p class="footer">\n        </p>\n        <!--/div-->\n    </body>\n</html>\n\n')
+        __M_writer(unicode(next.body()))
+        __M_writer(u'\n        <p class="footer">\n        </p>\n        <!--/div-->\n    </body>\n</html>\n\n')
         return ''
     finally:
-        context.caller_stack.pop_frame()
+        context.caller_stack._pop_frame()
 
 

Modified: arkaiv/trunk/data/templates/autohandler.pyc
===================================================================
(Binary files differ)

Modified: arkaiv/trunk/data/templates/mainpage.mak.py
===================================================================
--- arkaiv/trunk/data/templates/mainpage.mak.py	2009-01-22 02:26:07 UTC (rev 3844)
+++ arkaiv/trunk/data/templates/mainpage.mak.py	2009-01-22 02:46:05 UTC (rev 3845)
@@ -1,8 +1,10 @@
 from mako import runtime, filters, cache
 UNDEFINED = runtime.UNDEFINED
-_magic_number = 2
-_modified_time = 1193360629.6704099
-_template_filename='/home/dcrowdy/src/arkaiv/arkaiv/trunk/arkaiv/templates/mainpage.mak'
+__M_dict_builtin = dict
+__M_locals_builtin = locals
+_magic_number = 5
+_modified_time = 1232592201.65452
+_template_filename='/home/dcrowdy/src/arkaiv/trunk/arkaiv/templates/mainpage.mak'
 _template_uri='/mainpage.mak'
 _template_cache=cache.Cache(__name__, _modified_time)
 _source_encoding=None
@@ -21,24 +23,25 @@
     _mako_generate_namespaces(context)
     return runtime._inherit_from(context, u'/autohandler', _template_uri)
 def render_body(context,**pageargs):
-    context.caller_stack.push_frame()
+    context.caller_stack._push_frame()
     try:
-        __M_locals = dict(pageargs=pageargs)
+        __M_locals = __M_dict_builtin(pageargs=pageargs)
         h = context.get('h', UNDEFINED)
         c = context.get('c', UNDEFINED)
+        __M_writer = context.writer()
         # SOURCE LINE 1
-        context.write(u' \n<h2>\nAll items\n</h2>\n\n')
+        __M_writer(u' \n<h2>\nAll items\n</h2>\n\n')
         # SOURCE LINE 6
         for item in c.items:
             # SOURCE LINE 7
-            context.write(u'<li>\n    ')
+            __M_writer(u'<li>\n    ')
             # SOURCE LINE 8
-            context.write(unicode( h.link_to(item['name'], h.url(action="displayitem", edit="no", id=item['index'])) ))
-            context.write(u'\n</li>\n')
+            __M_writer(unicode( h.link_to(item['name'], h.url(action="displayitem", edit="no", id=item['index'])) ))
+            __M_writer(u'\n</li>\n')
         # SOURCE LINE 11
-        context.write(u'\n\n')
+        __M_writer(u'\n\n')
         return ''
     finally:
-        context.caller_stack.pop_frame()
+        context.caller_stack._pop_frame()
 
 

Modified: arkaiv/trunk/data/templates/mainpage.mak.pyc
===================================================================
(Binary files differ)



More information about the commits mailing list