def get(request, device): if device[-1]=="/": device=device[:-1] resp=HttpResponse("", mimetype="text/plain") resp["Content-Type"]="text/plain; charset=utf-8" w=getWeather(device) resp.write(u"\n".join(w)) return resp
def get(request, device): if device[-1] == '/': device = device[:-1] resp = HttpResponse('', mimetype='text/plain') resp['Content-Type'] = 'text/plain; charset=utf-8' w = getWeather(device) resp.write((u'\n').join(w)) return resp
def get(request, device): if device[-1]=="/": device=device[:-1] resp=HttpResponse("", mimetype="text/plain") resp["Content-Type"]="text/plain; charset=utf-8" if "msg" in settings.ENABLED_MOD: w=getWeather(device) resp.write(u"\n".join(w)) return resp else: return render_to_response("info.html", {"title": _("Error"), "content": _("The server is not installed information services module!")});
def get(request, device): if device[-1] == '/': device = device[:-1] resp = HttpResponse('', mimetype='text/plain') resp['Content-Type'] = 'text/plain; charset=utf-8' if 'msg' in settings.ENABLED_MOD: w = getWeather(device) resp.write((u'\n').join(w)) return resp return render_to_response( 'info.html', { 'title': _('Error'), 'content': _('The server is not installed information services module!') })