support timedelta for SEND_FILE_MAX_AGE_DEFAULT config variable

This commit is contained in:
Timo Furrer 2015-10-24 07:04:23 +02:00
parent 1ac4156016
commit d526932a09
5 changed files with 36 additions and 7 deletions

View file

@ -17,14 +17,11 @@ from werkzeug.http import http_date, parse_date
from werkzeug.datastructures import CallbackDict
from . import Markup, json
from ._compat import iteritems, text_type
from .helpers import total_seconds
from itsdangerous import URLSafeTimedSerializer, BadSignature
def total_seconds(td):
return td.days * 60 * 60 * 24 + td.seconds
class SessionMixin(object):
"""Expands a basic dictionary with an accessors that are expected
by Flask extensions and users for the session.