addmanual added to menu
This commit is contained in:
@@ -400,12 +400,22 @@ def remove_rower_session(r,ps):
|
||||
|
||||
return 1
|
||||
|
||||
def get_dates_timeperiod(timeperiod,startdatestring='',enddatestring=''):
|
||||
def get_dates_timeperiod(request,startdatestring='',enddatestring=''):
|
||||
# set start end date according timeperiod
|
||||
|
||||
timeperiod = request.GET.get('when')
|
||||
|
||||
if not timeperiod:
|
||||
timeperiod = 'thisweek'
|
||||
|
||||
|
||||
startdatestring = request.GET.get('startdate')
|
||||
enddatestring = request.GET.get('enddate')
|
||||
|
||||
if startdate and enddate:
|
||||
startdate = dt.datetime.strptime(startdatestring,'%Y-%m-%d').date()
|
||||
enddate = dt.datetime.strptime(enddatestring,'%Y-%m-%d').date()
|
||||
return startdate,enddate
|
||||
|
||||
daterangetester = re.compile('^(\d+-\d+-\d+)\/(\d+-\d+-\d+)')
|
||||
|
||||
if timeperiod=='today':
|
||||
|
||||
Reference in New Issue
Block a user