-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add management command run_ontology_script
- Loading branch information
1 parent
c0cd027
commit b1d1a00
Showing
4 changed files
with
23 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
**/__pycache__ | ||
*.db | ||
*.lock | ||
.env | ||
apis_ontology/settings/local_settings.py |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# from apis_core.apis_entities.models import * | ||
# from apis_core.apis_relations.models import * | ||
# from apis_core.apis_vocabularies.models import * | ||
from django.core.management.base import BaseCommand | ||
import importlib | ||
|
||
# import random | ||
|
||
|
||
class Command(BaseCommand): | ||
def handle(self, *args, **options): | ||
|
||
script = importlib.import_module( | ||
f"apis_ontology.ontology_specific_scripts.{options['ontology_script']}" | ||
) | ||
script.run() | ||
|
||
def add_arguments(self, parser): | ||
|
||
parser.add_argument("ontology_script") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters