Web M&M
https://mam.matfyz.cz
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.
15 lines
302 B
15 lines
302 B
4 years ago
|
def april(req):
|
||
|
if 'X-April' in req.headers:
|
||
|
try:
|
||
|
year = int(req.headers['X-April'])
|
||
|
return {'april': year}
|
||
|
except:
|
||
|
pass # Fall-back to regular behaviour
|
||
|
|
||
|
import datetime
|
||
|
today = datetime.date.today()
|
||
|
if today.day == 1 and today.month == 4:
|
||
|
return {'april': today.year}
|
||
|
return {}
|
||
|
|