Exemple #1
0
def get_all():
    s=sql()
    return s.get_all()
Exemple #2
0
#!/usr/bin/env python2.7
import SOAPpy
import time
start_time = time.time()
from db.mtsql import sql

s = sql()

server = SOAPpy.SOAPProxy("http://127.0.0.1:7777/")
resp = server.get_last_3h()
print resp
print time.time() - start_time, "seconds"

start_time = time.time()
print s.get_last_3h()
print time.time() - start_time, "seconds"


#for item in resp:
#    print item.data





#server.hello()
Exemple #3
0
def get_last_24h():
    s=sql()
    return s.get_last_24h()
Exemple #4
0
def get_dayly():
    s=sql()
    return s.get_dayly()
Exemple #5
0
def get_hourly():
    s=sql()
    return s.get_hourly()
Exemple #6
0
def get_last():
    s=sql()
    return s.get_last()
Exemple #7
0
from django.contrib.auth.decorators import login_required
from django import template
from django.template.defaultfilters import stringfilter
from django.template import *
register = template.Library()
from django.template import RequestContext
import datetime
from webstat import settings
from db.mtsql import sql
from weather.weather import Weather
import os
import SOAPpy



s = sql()
###


cpath = os.path.dirname(os.path.abspath(__file__))
spath = cpath[:-9]+"statics/images/"
s=sql()
w=Weather()

#@login_required
def hello(request): 
    last3h = s.get_last_3h()

    last3hour = []
    pres = []
    time = []