Permalink
Browse files

Updated views to work with pystache 0.5.0

  • Loading branch information...
1 parent 2d4f03b commit 63b383793ad5ad5a74b27d40d65300f21f19d6a9 @james-m-henderson james-m-henderson committed Apr 18, 2012
Showing with 8 additions and 3 deletions.
  1. +1 −1 requirements.txt
  2. +7 −2 resweb/views.py
View
2 requirements.txt
@@ -1,5 +1,5 @@
simplejson==2.0.9
itty==0.6.2
redis>=1.34.1
-pystache==0.1.0
+pystache==0.5.0
setproctitle>=1.0
View
9 resweb/views.py
@@ -7,12 +7,16 @@
import datetime
TEMPLATE_PATH = os.path.join(os.path.dirname(__file__), 'templates')
-class ResWeb(pystache.View):
+class ResWeb(pystache.TemplateSpec):
template_path = TEMPLATE_PATH
+ renderer = pystache.Renderer(search_dirs = template_path)
+
def __init__(self, host):
- super(ResWeb, self).__init__()
self.resq = host
+ def render(self):
+ return self.renderer.render(self)
+
def media_folder(self):
return '/media/'
@@ -122,6 +126,7 @@ def empty_workers(self):
return False
else:
return True
+
class Queues(Overview):
template_name = 'queue_full'

0 comments on commit 63b3837

Please sign in to comment.