Commit d97fdb44 authored by zhengjinlei's avatar zhengjinlei

数据统计

parent e3916d05
......@@ -6,9 +6,8 @@ from dateutil.rrule import rrule, DAILY
# Create your views here.
def stat_rules_every(request):
date = request.GET.get('date')
start_date = datetime.strptime(date, '%Y-%m-%d')
end_date = datetime.strptime(date + ' 23:59:59', '%Y-%m-%d %H:%M:%S')
start_date = request.GET.get('start_date')
end_date = request.GET.get('end_date')
s_date = datetime.strptime(start_date, '%Y-%m-%d')
e_date = datetime.strptime(end_date + ' 23:59:59', '%Y-%m-%d %H:%M:%S')
seed_dt = list(rrule(DAILY, byweekday=[0, 1, 2, 3, 4, 5, 6], dtstart=s_date, until=e_date))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment