X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/357027375ff8867f42ca34bcbfb5a78b5b185fc3..46185b67f099b17b25b55d3ad49d8d45a2fc3a6f:/src/api/helpers.py?ds=sidebyside diff --git a/src/api/helpers.py b/src/api/helpers.py index 62578e7c3..03fc18ce6 100644 --- a/src/api/helpers.py +++ b/src/api/helpers.py @@ -5,10 +5,12 @@ from time import mktime from piston.resource import Resource + def timestamp(dtime): - "converts a datetime.datetime object to a timestamp int" + """converts a datetime.datetime object to a timestamp int""" return int(mktime(dtime.timetuple())) + class CsrfExemptResource(Resource): """A Custom Resource that is csrf exempt""" def __init__(self, handler, authentication=None):