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

Bump django to 4.0 #664

Merged
merged 7 commits into from
Oct 19, 2023
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
7 changes: 4 additions & 3 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ verify_ssl = true
name = "pypi"

[packages]
django = "==3.2.*"
django = "==4.0.*"
# Templatetags for bootstrap3
django-braces = "*" # Extra mixinclasses for models and views
django-contrib-comments = "*"
django-filebrowser-no-grappelli = "*" # Filebrowser for mediafiles.
django-haystack = "==3.0b1" # Search functionality for django models. See whoosh as well
django-haystack = "==3.2" # Search functionality for django models. See whoosh as well
django-hitcount = "*"
django-image-cropping = "==1.5"
django-image-cropping = "==1.7"
django-markdown-deux = "*"
django-sekizai = "*" # Templatetag library for extra block functionality
easy-thumbnails = "*" # Thumbnail creator
Expand All @@ -27,6 +27,7 @@ django-multi-email-field = "*"
django-bootstrap4 = "*"
django-ckeditor = "*"
djangorestframework = "*"
tzdata = "*" # django-4.* uses zoneinfo, which in turn relies on tzdata. On windows tzdata is as of now ()13.10.2023) not installed by default

[dev-packages]
pre-commit = "*"
Expand Down
47 changes: 31 additions & 16 deletions Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions nablapps/accounts/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from django.contrib.flatpages.models import FlatPage
from django.http import HttpResponseRedirect
from django.urls import reverse
from django.utils.encoding import smart_text
from django.utils.encoding import smart_str

from .forms import NablaUserChangeForm, NablaUserCreationForm
from .models import FysmatClass, NablaGroup, NablaUser, RegistrationRequest
Expand All @@ -30,7 +30,7 @@ class UserFullnameMultipleChoiceField(forms.ModelMultipleChoiceField):
"""

def label_from_instance(self, obj):
return smart_text(f"{obj.get_full_name()} - {obj.username}")
return smart_str(f"{obj.get_full_name()} - {obj.username}")


class GroupAdminForm(forms.ModelForm):
Expand Down
4 changes: 2 additions & 2 deletions nablapps/events/templates/events/administer_penalties.html
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@ <h2>Prikkadministrering for <a href="{{event.get_absolute_url}}">{{ event.headli
<tr>
<td><label for="user_penalty_{{registration.pk}}">{{ registration.user.get_full_name }}</label></td>
{% for penalty in event.get_penalty_rule_dict.values %}
<td><label style="width: 100%"><input type="radio" class="penalty_table_radio" name="user_penalty_{{registration.pk}}" value="{{ penalty }}" {% ifequal registration.penalty penalty %}checked{% endifequal %}></label></td>
<td><label style="width: 100%"><input type="radio" class="penalty_table_radio" name="user_penalty_{{registration.pk}}" value="{{ penalty }}" {% if registration.penalty == penalty %}checked{% endif %}></label></td>
{% endfor %}
<td><label style="width: 100%"><input type="radio" class="penalty_table_radio" name="user_penalty_{{registration.pk}}" value="None" {% ifequal registration.penalty None %}checked{% endifequal %}></label></td>
<td><label style="width: 100%"><input type="radio" class="penalty_table_radio" name="user_penalty_{{registration.pk}}" value="None" {% if registration.penalty == None %}checked{% endif %}></label></td>
<td>
{% if registration.attendance_registration %}
Ja
Expand Down
2 changes: 1 addition & 1 deletion nablapps/events/templates/events/event_detail.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ <h3>Påmeldte</h3>
<div class="registrations">
{% for registration in event.eventregistration_set.all %}
{% with user=registration.user %}
<span class="badge {% ifequal user request.user %} badge-info {% else %} badge-secondary {% endifequal %}
<span class="badge {% if user == request.user %} badge-info {% else %} badge-secondary {% endif %}
{% if registration.waiting %}
waiting-place
{% endif %}" style="display: inline-block;">
Expand Down
2 changes: 1 addition & 1 deletion templates/comments/preview.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ <h3>{% blocktrans count form.errors|length as counter %}Please correct the error
{% else %}
{% if field.errors %}
<p {% if field.errors %} class="error"{% endif %}
{% ifequal field.name "honeypot" %} style="display:none;"{% endifequal %}>
{% if field.name == "honeypot" %} style="display:none;"{% endif %}>
{{ field.label_tag }}
{{ field.errors }}
</p>
Expand Down
Loading