Added createsuperuser function, & execute it from configure. This

enables docker users to access the django administration site without
requiring access to a cli
This commit is contained in:
th3r00t
2020-09-03 22:17:07 -04:00
parent c0a4c3e8c1
commit b23cbf17d5
5 changed files with 62 additions and 9 deletions

View File

@@ -37,11 +37,11 @@ class Config:
self.db_user = self._data["USER"]
self.db_pass = self._data["PASSWORD"]
self.SECRET = self._data["SECRET"]
self.debug_build_mode = (_data["BUILD_MODE"].casefold() == "debug")
self.debug_build_mode = (self._data["BUILD_MODE"].casefold() == "debug")
def get_logger(self):
_logger = logger
_logger.add(pathlib.PurePath(self.root, 'data','{time}.log'),
_logger.add(pathlib.PurePath(self.root, 'data','pyshelf.log'),
rotation="2 MB", enqueue=True, colorize=True)
return _logger