Skip to content

armgit / wger

Public Imported from GitHub
0

Self hosted FLOSS fitness/workout, nutrition and weight tracker

Don't output reacts static files on its own but with the rest

Roland Geider8385c66bcb37
diff --git a/wger/core/templates/index.html b/wger/core/templates/index.html
index 80bab64db..2d46d07b6 100644
--- a/wger/core/templates/index.html
+++ b/wger/core/templates/index.html
@@ -7,7 +7,6 @@
{# Header #}
{# #}
{% block header %}
- {% react_static %}
{% endblock %}
diff --git a/wger/core/templates/react/react-page.html b/wger/core/templates/react/react-page.html
index 10bb915fb..1e3648884 100644
--- a/wger/core/templates/react/react-page.html
+++ b/wger/core/templates/react/react-page.html
@@ -22,7 +22,6 @@
{# Header #}
{# #}
{% block header %}
- {% react_static %}
{% endblock %}
diff --git a/wger/core/templates/tags/react_static.html b/wger/core/templates/tags/react_static.html
deleted file mode 100644
index 03ec106c4..000000000
--- a/wger/core/templates/tags/react_static.html
+++ /dev/null
@@ -1,3 +0,0 @@
-{% load static %}
-<link rel="stylesheet" type="text/css" href="{% static 'react/main.css' %}" id="react-css">
-<script src="{% static 'react/main.js' %}" defer="defer"></script>
diff --git a/wger/core/templates/template.html b/wger/core/templates/template.html
index e4d453593..1dbfbb5d8 100644
--- a/wger/core/templates/template.html
+++ b/wger/core/templates/template.html
@@ -53,6 +53,7 @@
<link rel="stylesheet" type="text/css" href="{% static 'fontawesomefree/css/all.min.css' %}">
<link rel="stylesheet" type="text/css" href="{% static 'yarn/metrics-graphics/dist/metricsgraphics.css' %}">
<link rel="stylesheet" type="text/css" href="{% static 'css/metricsgraphics-custom.css' %}">
+ <link rel="stylesheet" type="text/css" href="{% static 'react/main.css' %}" id="react-css">
{% endcompress %}
<link rel="icon" href="{% static 'images/favicon.png' %}" type="image/png">
@@ -68,6 +69,7 @@
<script src="{% static 'yarn/masonry-layout/dist/masonry.pkgd.min.js' %}"></script>
<script src="{% static 'js/wger-core.js' %}"></script>
<script src="{% static 'js/nutrition.js' %}"></script>
+ <script src="{% static 'react/main.js' %}" defer="defer"></script>
{% endcompress %}
{% block header %}{% endblock %}
diff --git a/wger/core/templatetags/wger_extras.py b/wger/core/templatetags/wger_extras.py
index bd46200b3..ecb1043fb 100644
--- a/wger/core/templatetags/wger_extras.py
+++ b/wger/core/templatetags/wger_extras.py
@@ -106,18 +106,6 @@ def render_weight_log(log, div_uuid, user=None):
}
[email protected]_tag('tags/react_static.html')
-def react_static():
- """
- Renders the necessary tags to load react's static files
-
- This is a temporary solution until we have a proper react setup used
- in more templates, then this can go to the main template
- """
-
- return {}
-
-
@register.inclusion_tag('tags/muscles.html')
def render_muscles(muscles=None, muscles_sec=None):
"""
diff --git a/wger/manager/templates/workout/view.html b/wger/manager/templates/workout/view.html
index e67a5b59d..610c94953 100644
--- a/wger/manager/templates/workout/view.html
+++ b/wger/manager/templates/workout/view.html
@@ -23,7 +23,6 @@
{# Header #}
{# #}
{% block header %}
- {% react_static %}
{% endblock %}
diff --git a/wger/weight/templates/overview.html b/wger/weight/templates/overview.html
index 0471f498a..b083e29a7 100644
--- a/wger/weight/templates/overview.html
+++ b/wger/weight/templates/overview.html
@@ -10,7 +10,6 @@
{# Header #}
{# #}
{% block header %}
- {% react_static %}
{% endblock %}