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

@@ -17,28 +17,37 @@ sys.path.insert(0, PRG_PATH)
tx = None
async def runImport():
async def RunImport():
"""
Begin live import of books
"""
execute_scan(PRG_PATH, config=config)
MakeCollections(PRG_PATH, config=config)
return "Import Complete"
async def socketio(websocket, path):
"""
Web Socket Controller
"""
async for message in websocket:
config.logger.info("Message Processing")
if message == "ping":
config.logger.info("<< Ping")
tx = pong(message)
tx = pong()
elif message == "importBooks":
config.logger.info("Starting Import")
tx = "Starting Import . . ."
await websocket.send(tx)
await runImport()
await RunImport()
tx = "complete"
await websocket.send(tx)
def pong(message):
def pong():
"""
Respond to incoming pings
"""
config.logger.info(">> Pong")
return "pong"