Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Django js reverse upgrade #1714

Merged
merged 3 commits into from
Sep 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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