Skip to content

Commit

Permalink
django upgrade 4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
m4ra committed Oct 31, 2023
1 parent a29990b commit d3681b6
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 5 deletions.
7 changes: 7 additions & 0 deletions changelog/7782.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
### Updated

- Django from 3.2.19 to 4.0
- apps: remove deprecated app config in apps init
- settings: LN10N is now enabled by default
- templates: ifequal not supported

2 changes: 0 additions & 2 deletions digitalstrategie/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,6 @@

USE_I18N = True

USE_L10N = True

USE_TZ = True

LANGUAGES = [
Expand Down
2 changes: 1 addition & 1 deletion digitalstrategie/templates/includes/pagination.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

{% for page_number in paginated_page_range %}
{% if page_number >= 0 %}
<li {% ifequal page_number page_obj.number %}class="active" aria-current="page"{% endifequal %}>
<li {% if page_number == page_obj.number %}class="active" aria-current="page"{% endif %}>
{% combined_url_parameter request.GET page=page_number as url_par %}
<a href="{{ url_par }}{% if anchor %}{{ anchor }}{% endif %}">{{ page_number }}</a>
</li>
Expand Down
3 changes: 2 additions & 1 deletion digitalstrategie/templates/includes/upper_footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ <h3 class="heading js-trigger">{{ menuitem.title }}</h3>
{% get_language_info for 'de-ls' as language %}
{% get_has_translation page 'de_ls' as has_translation_de_ls %}
<li>
<form class="footer-menu__btn" action="{% url 'set_language' %}" method="post">
<!-- following might not working bcz of django 4.0 doesn’t set the user language in request.session-->
<form class="footer-menu__btn" action="{% url 'set_language' %}" method="post"
{% csrf_token %}
<input name="next" type="hidden" value="{% if has_translation_de_ls %}{{ redirect_to }}{% else %}/{% endif %}" />
<input name="language" type="hidden" value="{{ language.code }}">
Expand Down
2 changes: 1 addition & 1 deletion requirements/base.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
brotli==1.1.0
Django==3.2.19
Django==4.0
django-cloudflare-push==0.2.2
django-csp==3.7
django-multiselectfield==0.1.12
Expand Down

0 comments on commit d3681b6

Please sign in to comment.