mirror of https://github.com/midoks/mdserver-web
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
513 B
28 lines
513 B
# coding:utf-8
|
|
|
|
from flask import Flask
|
|
from flask import Blueprint, render_template
|
|
|
|
import sys
|
|
sys.path.append("class/")
|
|
import public
|
|
|
|
|
|
task = Blueprint('task', __name__, template_folder='templates')
|
|
|
|
|
|
@task.route("/")
|
|
def index():
|
|
return render_template('default/site.html')
|
|
|
|
|
|
@task.route("/count")
|
|
def count():
|
|
c = public.M('tasks').where("status!=?", ('1',)).count()
|
|
return str(c)
|
|
|
|
|
|
@task.route("/list")
|
|
def list():
|
|
c = public.M('tasks').where("status!=?", ('1',)).count()
|
|
return str(c)
|
|
|