def _get_thermography(url, date): logging.info("%s %s" % (url, date)) from thermography.models import ThermographyPointDaily _thermographies = ThermographyPointDaily.gql( "WHERE url=:url AND date=:date", url=url.rstrip('/'), date=date).fetch(1) logging.info(_thermographies) return _thermographies[0] if _thermographies else None
def _get_thermography(url, date): logging.info("%s %s" % (url, date)) from thermography.models import ThermographyPointDaily _thermographies = ThermographyPointDaily.gql("WHERE url=:url AND date=:date", url=url.rstrip("/"), date=date).fetch( 1 ) logging.info(_thermographies) return _thermographies[0] if _thermographies else None
def thermographies(request): if _invalid_configuration(request): return _redirect_configuration(request) site = None _thermographies = None if request.args.has_key("site"): site = Sites.get(request.args["site"]) if site.user != request.user: return _redirect_configuration(request) from thermography.models import ThermographyPointDaily _thermographies = ThermographyPointDaily.all().filter("site =", site).order("-date").fetch(1000) return render_to_response("admin/thermographies.html", {"site": site, "thermographies": _thermographies})
def thermographies(request): if _invalid_configuration(request): return _redirect_configuration(request) site = None _thermographies = None if request.args.has_key('site'): site = Sites.get(request.args['site']) if site.user != request.user: return _redirect_configuration(request) from thermography.models import ThermographyPointDaily _thermographies = ThermographyPointDaily.all().filter( 'site =', site).order('-date').fetch(1000) return render_to_response('admin/thermographies.html', { "site": site, "thermographies": _thermographies })
def _get_site_page(url): from thermography.models import ThermographyPointDaily _thermographies = ThermographyPointDaily.gql("url =", url.rstrip('/')).fetch(1) return _thermographies[0] if _thermographies else None
def _get_site_page(url): from thermography.models import ThermographyPointDaily _thermographies = ThermographyPointDaily.gql("url =", url.rstrip("/")).fetch(1) return _thermographies[0] if _thermographies else None