Skip to content

Commit 8837eb9

Browse files
committed
Merged in Django 2.2 changes.
- Legacy-Id: 18090
2 parents 8892a6b + 47a2174 commit 8837eb9

169 files changed

Lines changed: 218 additions & 217 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

changelog

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,42 @@
1+
ietfdb (7.6.0) ietf; urgency=medium
2+
3+
Django 2.2 transition changes:
4+
5+
* New branch for 7.5.1.dev0
6+
7+
* Changed deprecated 'load staticfiles' to recommended 'load static'
8+
9+
* Added a warnings filter. Removed the use request_profiler, which is
10+
not compatible with Django 2.2.
11+
12+
* Removed an unused parameter from submit.tests.do_submission_email().
13+
14+
* Updated requirements for Django 2.2.
15+
16+
* Fixed an issue where a session was saved without a type_id, found by
17+
the Django 2.2 checks. The code set the value just after the first save,
18+
and then did a second save, but this is 1) more costly, and 2) keeps an
19+
invalid session object in the database for a short time.
20+
21+
* Fixed a place where data provider for a POST in contained None, which
22+
cannot be serialized into POST data. Found by Django 2.2 checks.
23+
24+
* Django 2.2 does not wrap single queries in transactions, for
25+
performance reasons. This caused some template tags that did database
26+
lookups to trigger exceptions. Fixed by moving the lookups (which would
27+
not normally change between apache reloads) out from the template tag code
28+
to module scope. Adding new groups of type
29+
['ag','area','team','dir','program'] will now require a reload to show up
30+
in the group menu.
31+
32+
Other changes:
33+
34+
* Changed skip messages from test suites to use print() instead of
35+
sys.stderr.write(), to match other output from the test runner.
36+
37+
-- Henrik Levkowetz <henrik@levkowetz.com> 27 Jun 2020 17:33:10 +0000
38+
39+
140
ietfdb (7.5.0) ietf; urgency=medium
241

342
**Django 2.1 upgrade, CodiMD support, bluesheet support for Meetecho, and bugfixes**

ietf/doc/templatetags/active_groups_menu.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,11 @@
55

66
register = template.Library()
77

8+
parents = GroupTypeName.objects.filter(slug__in=['ag','area','team','dir','program'])
9+
810
@register.simple_tag
911
def active_groups_menu():
10-
parents = GroupTypeName.objects.filter(slug__in=['ag','area','team','dir','program'])
12+
global parents
1113
for p in parents:
1214
p.menu_url = '/%s/'%p.slug
1315
return render_to_string('base/menu_active_groups.html', { 'parents': parents })

ietf/doc/templatetags/wg_menu.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,14 @@
4343
'rai':'RAI'
4444
}
4545

46+
parents = Group.objects.filter(
47+
models.Q(type="area") | models.Q(type="irtf", acronym="irtf"),
48+
state="active"
49+
).order_by('type_id', 'acronym')
50+
4651
@register.simple_tag
4752
def wg_menu():
48-
parents = Group.objects.filter(models.Q(type="area") | models.Q(type="irtf", acronym="irtf"),
49-
state="active").order_by('type_id', 'acronym')
53+
global parents
5054

5155
for p in parents:
5256
p.short_name = area_short_names.get(p.acronym) or p.name

ietf/meeting/forms.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,9 +250,11 @@ def clean_requested_duration(self):
250250
def save(self, *args, **kwargs):
251251
"""NOTE: as the baseform of an inlineformset self.save(commit=True)
252252
never gets called"""
253-
session = super(InterimSessionModelForm, self).save(commit=kwargs.get('commit', True))
253+
session = super(InterimSessionModelForm, self).save(commit=False)
254254
session.group = self.group
255255
session.type_id = 'regular'
256+
if kwargs.get('commit', True) is True:
257+
super(InterimSessionModelForm, self).save(commit=True)
256258
return session
257259

258260
def save_agenda(self):

ietf/secr/rolodex/tests.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ def test_edit_replace_user(self):
6161
post_data = {
6262
'name': person.name,
6363
'ascii': person.ascii,
64-
'ascii_short': person.ascii_short,
64+
'ascii_short': person.ascii_short or '',
6565
'user': user.username,
6666
'email-0-person':person.pk,
6767
'email-0-address': email.address,

ietf/settings.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
warnings.filterwarnings("ignore", message="Add the `renderer` argument to the render\(\) method of", module="bootstrap3")
1717
warnings.filterwarnings("ignore", message="The logout\(\) view is superseded by")
1818
warnings.filterwarnings("ignore", message="Report.file_reporters will no longer be available in Coverage.py 4.2", module="coverage.report")
19-
19+
warnings.filterwarnings("ignore", message="{% load staticfiles %} is deprecated")
2020

2121
try:
2222
import syslog
@@ -378,9 +378,6 @@ def skip_unreadable_post(record):
378378

379379

380380
MIDDLEWARE = [
381-
# Must be first to measure correct request timing
382-
'request_profiler.middleware.ProfilingMiddleware',
383-
#
384381
'django.middleware.csrf.CsrfViewMiddleware',
385382
'corsheaders.middleware.CorsMiddleware', # see docs on CORS_REPLACE_HTTPS_REFERER before using it
386383
'django.middleware.common.CommonMiddleware',
@@ -429,7 +426,6 @@ def skip_unreadable_post(record):
429426
'djangobwr',
430427
'form_utils',
431428
'oidc_provider',
432-
'request_profiler',
433429
'simple_history',
434430
'tastypie',
435431
'widget_tweaks',
@@ -1107,7 +1103,6 @@ def skip_unreadable_post(record):
11071103

11081104
CHECKS_LIBRARY_PATCHES_TO_APPLY = [
11091105
'patch/fix-unidecode-argument-warning.patch',
1110-
'patch/fix-request-profiler-streaming-length.patch',
11111106
'patch/change-oidc-provider-field-sizes-228.patch',
11121107
'patch/fix-oidc-access-token-post.patch',
11131108
'patch/fix-jwkest-jwt-logging.patch',

ietf/submit/tests.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1673,7 +1673,6 @@ def do_submission_email(self, the_url, to, body):
16731673
q = PyQuery(r.content)
16741674
post_button = q('[type=submit]:contains("Send Email")')
16751675
self.assertEqual(len(post_button), 1)
1676-
action = post_button.parents("form").find('input[type=hidden][name="action"]').val()
16771676
subject = post_button.parents("form").find('input[name="subject"]').val()
16781677
frm = post_button.parents("form").find('input[name="frm"]').val()
16791678
cc = post_button.parents("form").find('input[name="cc"]').val()
@@ -1683,7 +1682,6 @@ def do_submission_email(self, the_url, to, body):
16831682

16841683
# post submitter info
16851684
r = self.client.post(the_url, {
1686-
"action": action,
16871685
"subject": subject,
16881686
"frm": frm,
16891687
"to": to,

ietf/templates/401.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{# Copyright The IETF Trust 2012, All Rights Reserved #}
22
{% extends "base.html" %}
3-
{% load staticfiles %}
3+
{% load static %}
44
{% block title %}401 Unauthorized{% endblock %}
55
{% block content %}
66

ietf/templates/404.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{# Copyright The IETF Trust 2007, All Rights Reserved #}
22
{% extends "base.html" %}
3-
{% load staticfiles %}
3+
{% load static %}
44
{% block title %}404 Not Found{% endblock %}
55
{% block content %}
66

ietf/templates/500.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{# Copyright The IETF Trust 2007, All Rights Reserved #}
22
{% extends "base.html" %}
3-
{% load staticfiles %}
3+
{% load static %}
44
{% block title %}500 Internal Server Error{% endblock %}
55
{% block content %}
66

0 commit comments

Comments
 (0)