def home(req): template = loader.get_template('home.html') #ctx = gf_template.get_context(req, {}) ctx = RequestContext(req, {}) ctx.node_url= settings.NODE_URL or 'http://localhost:3000' if('debug' in req.GET and req.GET['debug']): ctx.debug_info = renderDebugInfo() return HttpResponse(template.render(ctx))
def home(req): template = loader.get_template('home.html') #ctx = gf_template.get_context(req, {}) ctx = RequestContext(req, {}) ctx.node_url = settings.NODE_URL or 'http://localhost:3000' if ('debug' in req.GET and req.GET['debug']): ctx.debug_info = renderDebugInfo() return HttpResponse(template.render(ctx))
def handler(req, precon_id=None): print("handling %s ,method %s" %(req.path_info, req.method)) if(req.method == 'POST'): return persist(req) template = loader.get_template('ext.html') #ctx = gf_template.get_context(req, {}) ctx = RequestContext(req, {}) ctx.node_url= settings.NODE_URL or 'http://localhost:3000' ctx.mvc = True if req.META['HTTP_HOST'].find('mvc')>=0 else False return HttpResponse(template.render(ctx))
def handler(req, precon_id=None): print("handling %s ,method %s" % (req.path_info, req.method)) if (req.method == 'POST'): return persist(req) template = loader.get_template('ext.html') #ctx = gf_template.get_context(req, {}) ctx = RequestContext(req, {}) ctx.node_url = settings.NODE_URL or 'http://localhost:3000' ctx.mvc = True if req.META['HTTP_HOST'].find('mvc') >= 0 else False return HttpResponse(template.render(ctx))