Skip to content

Commit

Permalink
added 'pytz' as a dependency, for TIME_ZONE setting
Browse files Browse the repository at this point in the history
  • Loading branch information
dotchetter committed Dec 22, 2023
1 parent 39d658e commit 5fd43a3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pyttman/core/internals.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,19 +64,21 @@ def __init__(self, dictionary=None, **kwargs):
self.APP_NAME: str | None = None
self.LOG_FORMAT: str | None = None
self.LOG_TO_STDOUT: bool = False
self.STATIC_FILES_DIR: Path | None = None
self.TIME_ZONE: pytz.timezone = None

[self._set_attr(k, v) for k, v in kwargs.items()
if not inspect.ismodule(v)
and not inspect.isfunction(v)]

def __getitem__(self, item):
return self.__dict__[item]
return self.__dict__[item]

def _set_attr(self, k, v):
tmp = v
if isinstance(v, dict):
tmp = Settings._dict_to_object(v)

setattr(self, k, tmp)

def __repr__(self):
Expand Down
Binary file modified requirements.txt
Binary file not shown.

0 comments on commit 5fd43a3

Please sign in to comment.