Skip to content

armgit / wger

Public Imported from GitHub
0

Self hosted FLOSS fitness/workout, nutrition and weight tracker

Don't use hard coded paths for the i18n files for the datepicker

Roland Geider15fccd065af8
diff --git a/wger/core/templates/template.html b/wger/core/templates/template.html
index 7e20b4aaa..aefffc34b 100644
--- a/wger/core/templates/template.html
+++ b/wger/core/templates/template.html
@@ -53,7 +53,7 @@
<script src="{% static 'js/nutrition.js' %}" type="text/javascript"></script>
{% endcompress %}
- <script src="/static/js/bootstrap-datepicker/locales/bootstrap-datepicker.{{language.short_name}}.js" type="text/javascript"></script>
+ <script src="{% static datepicker_i18n_path %}" type="text/javascript"></script>
{% block header %}{% endblock %}
diff --git a/wger/utils/context_processor.py b/wger/utils/context_processor.py
index c88cb81c1..8e070ed2b 100644
--- a/wger/utils/context_processor.py
+++ b/wger/utils/context_processor.py
@@ -45,7 +45,8 @@ def processor(request):
'i18n_path': i18n_path,
# Translation links
- 'datepicker_i18n_path': 'js/jquery.ui.datepicker-{0}.js'.format(language.short_name),
+ 'datepicker_i18n_path': 'js/bootstrap-datepicker/locales/bootstrap-datepicker.{0}.js'.
+ format(language.short_name),
# Flag for guest users
'has_demo_data': request.session.get('has_demo_data', False),