Example #1
0
    def GET(self):

        time_md5=get_time_md5()
        r = init_redis()
        checkcode = "data:image/gif;base64,"+r.hget('checkcode',time_md5)
        dic = {'time_md5': time_md5, 'checkcode':checkcode}
        json_object = json.dumps(dic)
        return json_object
Example #2
0
    def GET(self):

        time_md5 = get_time_md5()
        r = init_redis()
        checkcode = "data:image/gif;base64," + r.hget('checkcode', time_md5)
        dic = {'time_md5': time_md5, 'checkcode': checkcode}
        json_object = json.dumps(dic)
        return json_object
Example #3
0
    def GET(self):

        time_md5 = get_time_md5()
        session['time_md5'] = time_md5

        r = init_redis()
        checkcode = "data:image/gif;base64," + r.hget('checkcode', time_md5)

        return render.zheng(alert=zheng_alert, checkcode=checkcode)
Example #4
0
    def GET(self):

        time_md5= get_time_md5()
        session['time_md5']=time_md5

        r = init_redis()
        checkcode = "data:image/gif;base64,"+r.hget('checkcode',time_md5)

        return render.zheng(alert=zheng_alert, checkcode=checkcode)
Example #5
0
    def GET(self):
        global allclients
        try:
            time_md5 = get_time_md5()
        except URLError:
            return "can not touch zhengfang!"
        session['time_md5'] = time_md5
        form = get_index_form(time_md5)

        r = init_redis()
        checkcode = "data:image/gif;base64," + r.hget('checkcode', time_md5)
        return render.login(alert=zheng_alert, form=form, checkcode=checkcode)
Example #6
0
    def GET(self):
        global allclients
        try:
            time_md5= get_time_md5()
        except URLError:
            return "can not touch zhengfang!"
        session['time_md5'] = time_md5
        form = get_index_form(time_md5)

        r = init_redis()
        checkcode = "data:image/gif;base64,"+r.hget('checkcode',time_md5)
        return render.login(alert=zheng_alert, form=form, checkcode=checkcode)
Example #7
0
#!/usr/bin/env python
# -*- coding: utf-8 -*-

from code import app
from addons.tools import init_redis

def dev_server():
    app.run()

if __name__ == "__main__":
    r = init_redis()
    r.flushdb()
    print "clear redis db"
    from django.utils import autoreload
    autoreload.main(dev_server)
Example #8
0
#!/usr/bin/env python
# -*- coding: utf-8 -*-

from code import app
from addons.tools import init_redis


def dev_server():
    app.run()


if __name__ == "__main__":
    r = init_redis()
    r.flushdb()
    print "clear redis db"
    from django.utils import autoreload
    autoreload.main(dev_server)