Skip to content

Commit

Permalink
Add baseUrl function to assets
Browse files Browse the repository at this point in the history
  • Loading branch information
jochenklar committed May 21, 2024
1 parent e01e235 commit 39172bd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions daiquiri/core/assets/js/utils/baseUrl.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
// take the baseurl from the <head> of the django template
export default document.querySelector('meta[name="baseurl"]').content.replace(/\/+$/, '')
6 changes: 3 additions & 3 deletions daiquiri/query/urls.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from django.urls import include, path
from django.urls import include, path, re_path
from rest_framework import routers

from .views import ExamplesView, JobsView, QueryView, NewQueryView, NewJobsView, NewExamplesView
Expand All @@ -23,8 +23,8 @@
path(r'', QueryView.as_view(), name='query'),
path(r'jobs/', JobsView.as_view(), name='jobs'),
path(r'examples/', ExamplesView.as_view(), name='examples'),
path(r'new/', NewQueryView.as_view(), name='query_new'),
path(r'jobs/new/', NewJobsView.as_view(), name='jobs_new'),
re_path(r'new/', NewQueryView.as_view(), name='query_new'),
re_path(r'jobs/new/', NewJobsView.as_view(), name='jobs_new'),
path(r'examples/new/', NewExamplesView.as_view(), name='examples_new'),

# rest api
Expand Down

0 comments on commit 39172bd

Please sign in to comment.