Test a standalone script to use Django ORM without running webserver
The API server needs to be an optional component. It must not be required to run ARA. This is just a proof of concept of the internal Django client. Change-Id: Icf76e0d8cf65401536f858e29236ee913f25b4b1
This commit is contained in:
parent
a889a71bcd
commit
42b04c5674
13
standalone/test.py
Normal file
13
standalone/test.py
Normal file
@ -0,0 +1,13 @@
|
||||
import os
|
||||
import sys
|
||||
|
||||
import django
|
||||
|
||||
parent_directory = os.path.dirname(os.path.dirname(os.path.realpath(__file__)))
|
||||
sys.path.append(parent_directory)
|
||||
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "ara.settings")
|
||||
django.setup()
|
||||
|
||||
from api import models
|
||||
|
||||
print(models.Playbook.objects.all())
|
Loading…
x
Reference in New Issue
Block a user