Skip to content

Commit

Permalink
use render_view across the board
Browse files Browse the repository at this point in the history
  • Loading branch information
Gene Hallman committed Mar 4, 2015
1 parent dd0ada7 commit df740ec
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
7 changes: 2 additions & 5 deletions examples/loopback/handlers.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import tornado.web

import examples

kurento = examples.kurento
from examples import kurento, render_view

class LoopbackHandler(tornado.web.RequestHandler):
def on_event(self, *args, **kwargs):
Expand All @@ -11,8 +9,7 @@ def on_event(self, *args, **kwargs):
print kwargs

def get(self):
with open("views/loopback.html","r") as f:
self.finish(f.read())
render_view(self, "loopback")

def post(self):
sdp_offer = self.request.body
Expand Down
5 changes: 3 additions & 2 deletions examples/multires/handlers.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import tornado.web

from examples import kurento, render_view

class MultiResHandler(tornado.web.RequestHandler):
low_res = None
med_res = None
Expand All @@ -16,8 +18,7 @@ def get(self):
elif res == "low":
MultiResHandler.low_res.connect(MultiResHandler.incoming)
else:
with open("views/multires.html","r") as f:
self.finish(f.read())
render_view(self, "multires")

def post(self):
sdp_offer = self.request.body
Expand Down

0 comments on commit df740ec

Please sign in to comment.