Skip to content

Commit

Permalink
fix: Django js reverse upgrade (#1714)
Browse files Browse the repository at this point in the history
* fix: Use updated django-js-reverse library

* Update app name

* Reinstall portal
  • Loading branch information
faucomte97 authored Sep 3, 2024
1 parent fc82cd8 commit e6a9fe8
Show file tree
Hide file tree
Showing 6 changed files with 643 additions and 24 deletions.
652 changes: 635 additions & 17 deletions Pipfile.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion example_project/rapid_router_test_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
"django.contrib.sessions",
"django.contrib.messages",
"django.contrib.staticfiles",
"django_js_reverse",
"django_reverse_js",
"django_otp",
"django_otp.plugins.otp_static",
"django_otp.plugins.otp_totp",
Expand Down
2 changes: 1 addition & 1 deletion example_project/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
"django.contrib.sessions",
"django.contrib.messages",
"django.contrib.staticfiles",
"django_js_reverse",
"django_reverse_js",
"django_otp",
"django_otp.plugins.otp_static",
"django_otp.plugins.otp_totp",
Expand Down
4 changes: 2 additions & 2 deletions game/templates/game/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
<script defer id="data">
var PATH = {{request.path}}
</script>

<script type='text/javascript' src="{% static 'game/js/foundation/vendor/js.cookie.min.js' %}"></script>
<script type='text/javascript' src="{% static 'game/js/js-reverse.js' %}"></script>
<script type='text/javascript' src="{% static 'django_reverse_js/js/reverse.js' %}"></script>
<script type='text/javascript' src="{% url 'rapid-router/javascript-catalog' %}"></script>
<script type='text/javascript' src="{% static 'game/js/jquery.touchy.min.js' %}"></script>
{% endblock %}
Expand Down
5 changes: 3 additions & 2 deletions game/urls.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from django.conf.urls import url, include
from django.urls import path
from django.views.i18n import JavaScriptCatalog
from django_js_reverse.views import urls_js
from django_reverse_js.views import urls_js

from game.views.api import (
level_list,
Expand Down Expand Up @@ -266,7 +267,7 @@
]
),
),
url(r"^js-reverse/$", urls_js, name="js-reverse"),
path("reverse.js", urls_js, name="js-reverse"),
url(
r"^js-i18n/$",
JavaScriptCatalog.as_view(packages=["game"]),
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
install_requires=[
"django==3.2.25",
"django-csp==3.7",
"django-js-reverse==0.9.1",
"django-reverse-js==0.1.7",
"django-pipeline==2.0.8",
"djangorestframework==3.13.1",
"more-itertools==8.7.0",
Expand Down

0 comments on commit e6a9fe8

Please sign in to comment.