Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def __db_connect():
return MirageEnvironment.search_project_root() + "/.mirage/mirage_workspace.sqlite3"
def load_miragefile(self):
with MirageEnvironment(MirageEnvironmentLevel.inproject):
pass
def __init__(self, file_type = None):
with proj.MirageEnvironment(proj.MirageEnvironmentLevel.inproject):
if file_type == "secret":
self._data = self._load_json("Miragefile.secret")
elif file_type == "addon":
self._data = self._load_json("Miragefile.addon")
elif file_type == None:
self._data = self._load_json("Miragefile")
else:
mys.log("Wrong configuration type {0}.".format(file_type), withError = True)
def main(self):
with proj.MirageEnvironment(proj.MirageEnvironmentLevel.indjango):
mys.log("Launching Django Python Shell")
os.system("python manage.py dbshell")