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

Update django to 5.0.6 #3646

Merged
merged 2 commits into from
Jun 17, 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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion requirements/base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ allpairspy==2.5.1
bleach==6.1.0
bleach-allowlist==1.0.3
defusedxml==0.7.1
Django==4.2.13
Django==5.0.6
django-attachments==1.11
django-colorfield==0.11.0
django-contrib-comments==2.2.0
Expand Down
7 changes: 5 additions & 2 deletions tcms/core/widgets.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
# Copyright (c) 2018,2021 Kiwi TCMS project. All rights reserved.
# Copyright (c) 2018-2024 Kiwi TCMS project. All rights reserved.
# Author: Alexander Todorov <info@kiwitcms.org>

"""
Custom widgets for Django
"""
from django import forms
from django.utils.dateparse import parse_duration
from django.utils.safestring import SafeString


class SimpleMDE(forms.Textarea):
Expand All @@ -24,9 +25,11 @@ def render(self, name, value, attrs=None, renderer=None):
}
)
rendered_string = super().render(name, value, attrs, renderer)
rendered_string += f"""
rendered_string += SafeString(
f"""
<input id="{self.file_upload_id}" type="file" style="display: none">
"""
)
return rendered_string

class Media:
Expand Down