Skip to content

Commit e6655b0

Browse files
committed
Merge pull request binarymatt#104 from james-m-henderson/master
Updated pyres to work with pystache 0.5.0
2 parents 2d4f03b + 63b3837 commit e6655b0

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
simplejson==2.0.9
22
itty==0.6.2
33
redis>=1.34.1
4-
pystache==0.1.0
4+
pystache==0.5.0
55
setproctitle>=1.0

resweb/views.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,16 @@
77
import datetime
88

99
TEMPLATE_PATH = os.path.join(os.path.dirname(__file__), 'templates')
10-
class ResWeb(pystache.View):
10+
class ResWeb(pystache.TemplateSpec):
1111
template_path = TEMPLATE_PATH
12+
renderer = pystache.Renderer(search_dirs = template_path)
13+
1214
def __init__(self, host):
13-
super(ResWeb, self).__init__()
1415
self.resq = host
1516

17+
def render(self):
18+
return self.renderer.render(self)
19+
1620
def media_folder(self):
1721
return '/media/'
1822

@@ -122,6 +126,7 @@ def empty_workers(self):
122126
return False
123127
else:
124128
return True
129+
125130
class Queues(Overview):
126131
template_name = 'queue_full'
127132

0 commit comments

Comments
 (0)