File: settings.py

package info (click to toggle)
django-recurrence 1.12.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,148 kB
  • sloc: python: 2,530; javascript: 2,502; makefile: 159; sh: 6
file content (24 lines) | stat: -rw-r--r-- 585 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
"""
Settings for django recurrence.

DESERIALIZE_TZ determines if a datetime serialized as rfc2445 text
is returned as a naive datetime or a datetime with timezone.

If the django setting RECURRENCE_USE_TZ is true
then a timezone aware datetime is returned

If the django setting RECURRENCE_USE_TZ is false
then a naive datetime is returned

If this setting is not present the setting USE_TZ is used
as a default.
"""

from django.conf import settings


def deserialize_tz():
    try:
        return settings.RECURRENCE_USE_TZ
    except AttributeError:
        return settings.USE_TZ