except:
pass
if ExternalServer.objects.count() == 0:
for e in json.loads(file("../configs/custom_defaults/external.json").read()):
de, _ = ExternalServer.objects.get_or_create(name=e["name"], url=e["url"])
de.pull()
init_models()
After Change
except:
pass
if ExternalServer.objects.count() == 0 and "INIT_MODELS" in os.environ:
for e in json.loads(base64.decodestring(os.environ["INIT_MODELS"]))["external"]:
de, _ = ExternalServer.objects.get_or_create(name=e["name"], url=e["url"])
de.pull()
init_models()