Skip to content

Commit 53941db

Browse files
committed
[Fixes #633] Handle thesauri autoload and packaging
1 parent 2e26967 commit 53941db

3 files changed

Lines changed: 17 additions & 0 deletions

File tree

‎src/entrypoint.sh‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ else
5555
fi
5656

5757
invoke statics
58+
invoke loadthesauri
5859

5960
echo "Executing UWSGI server $cmd for Production"
6061
fi

‎src/pyproject.toml‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,7 @@ include-package-data = true
2525
[tool.setuptools.packages.find]
2626
# Equivalent to find_packages()
2727
where = ["."]
28+
29+
# Enable this entry if the app is providing rdf files
30+
#[tool.setuptools.package-data]
31+
#"*" = ["**/thesauri/*.rdf"]

‎src/tasks.py‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -388,6 +388,18 @@ def collectstatic(ctx):
388388
)
389389

390390

391+
@task
392+
def loadthesauri(ctx):
393+
print("**************************thesauri*******************************")
394+
try:
395+
ctx.run(
396+
f"python manage.py thesaurus autoload --settings={_localsettings()}",
397+
pty=True,
398+
)
399+
except Exception:
400+
pass
401+
402+
391403
@task
392404
def updateadmin(ctx):
393405
print("***********************update admin details**************************")

0 commit comments

Comments
 (0)