Skip to content
Snippets Groups Projects
Commit 89b47d3a authored by Auke Klazema's avatar Auke Klazema
Browse files

TMSS-477: Revert template and static file location

This does not work on dev machines but it does work for docker deployment.
A better solution needs to be found to work with both.
parent e2161be4
No related branches found
No related tags found
1 merge request!278Resolve TMSS-477
...@@ -155,7 +155,7 @@ ROOT_URLCONF = 'lofar.sas.tmss.tmss.urls' ...@@ -155,7 +155,7 @@ ROOT_URLCONF = 'lofar.sas.tmss.tmss.urls'
TEMPLATES = [ TEMPLATES = [
{ {
'BACKEND': 'django.template.backends.django.DjangoTemplates', 'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [BASE_DIR, os.path.join(BASE_DIR, 'templates'), os.path.join(os.environ.get('LOFARROOT'), 'lib64/python3.6/site-packages/lofar/sas/frontend','tmss_webapp')], 'DIRS': [BASE_DIR, os.path.join(BASE_DIR, 'templates'), os.path.join(BASE_DIR, '../frontend','tmss_webapp')],
'APP_DIRS': True, 'APP_DIRS': True,
'OPTIONS': { 'OPTIONS': {
'context_processors': [ 'context_processors': [
...@@ -169,7 +169,7 @@ TEMPLATES = [ ...@@ -169,7 +169,7 @@ TEMPLATES = [
] ]
STATICFILES_DIRS = [ STATICFILES_DIRS = [
os.path.join(os.environ.get('LOFARROOT'), 'lib64/python3.6/site-packages/lofar/sas/frontend','tmss_webapp/build/static') os.path.join(BASE_DIR, '../frontend','tmss_webapp/build/static')
] ]
WSGI_APPLICATION = 'lofar.sas.tmss.tmss.wsgi.application' WSGI_APPLICATION = 'lofar.sas.tmss.tmss.wsgi.application'
......
...@@ -35,7 +35,7 @@ def subtask_parset(request, subtask_pk:int): ...@@ -35,7 +35,7 @@ def subtask_parset(request, subtask_pk:int):
def index(request): def index(request):
return render(request, os.path.join(os.environ.get('LOFARROOT'), 'lib64/python3.6/site-packages/lofar/sas/frontend','tmss_webapp/build/index.html')) return render(request, os.path.join(os.path.dirname(os.path.dirname(os.path.realpath(__file__))), '../../frontend','tmss_webapp/build/index.html'))
#return render(request, "../../../frontend/frontend_poc/build/index.html") #return render(request, "../../../frontend/frontend_poc/build/index.html")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment