From 1813fa8aa770a7852aec6da2292761ff5043a39d Mon Sep 17 00:00:00 2001 From: Henrik Levkowetz Date: Thu, 3 Nov 2016 20:05:14 +0000 Subject: [PATCH 01/24] Changed requirements to the latest Django 1.8 release. - Legacy-Id: 12250 --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index fb54d41ba..fe52685f7 100644 --- a/requirements.txt +++ b/requirements.txt @@ -6,7 +6,7 @@ coverage>=4.0.1,!=4.0.2 #cssselect>=0.6.1 # for PyQuery decorator>=3.4.0 defusedxml>=0.4.1 # for TastyPie when ussing xml; not a declared dependency -Django>=1.7.10,<1.8 +Django>=1.8.16,<1.9 django-bootstrap3>=5.1.1,<7.0.0 # django-bootstrap 7.0 requires django 1.8 django-markup>=1.1 django-tastypie>=0.13.1 From 7b6407dfedd39c5768451ed6254c7e8c6939f51f Mon Sep 17 00:00:00 2001 From: Henrik Levkowetz Date: Thu, 3 Nov 2016 20:07:22 +0000 Subject: [PATCH 02/24] Rewrote the test runner command-line switch declarations to use parser.add_argument() instead of the now unsupported option_list class attribute. - Legacy-Id: 12251 --- ietf/utils/test_runner.py | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/ietf/utils/test_runner.py b/ietf/utils/test_runner.py index 917644ca3..503fc60f0 100644 --- a/ietf/utils/test_runner.py +++ b/ietf/utils/test_runner.py @@ -326,19 +326,18 @@ class CoverageTest(unittest.TestCase): self.skipTest("Coverage switched off with --skip-coverage") class IetfTestRunner(DiscoverRunner): - option_list = ( - make_option('--skip-coverage', - action='store_true', dest='skip_coverage', default=False, - help='Skip test coverage measurements for code, templates, and URLs. ' - ), - make_option('--save-version-coverage', - action='store', dest='save_version_coverage', default=False, - help='Save test coverage data under the given version label'), - make_option('--save-testresult', + @classmethod + def add_arguments(cls, parser): + parser.add_argument('--skip-coverage', + action='store_true', dest='skip_coverage', default=False, + help='Skip test coverage measurements for code, templates, and URLs. ' ) + parser.add_argument('--save-version-coverage', + action='store', dest='save_version_coverage', default=False, + help='Save test coverage data under the given version label') + parser.add_argument('--save-testresult', action='store_true', dest='save_testresult', default=False, help='Save short test result data in %s/testresult' % os.path.dirname(os.path.dirname(settings.BASE_DIR))), - ) def __init__(self, skip_coverage=False, save_version_coverage=None, **kwargs): # From 276c9c103046ac8cdb30d6ab1428ca43bb8bc5a7 Mon Sep 17 00:00:00 2001 From: Henrik Levkowetz Date: Thu, 3 Nov 2016 20:08:44 +0000 Subject: [PATCH 03/24] Removed use of the fix_ampersands() function. - Legacy-Id: 12252 --- ietf/doc/models.py | 2 +- ietf/doc/templatetags/ietf_filters.py | 4 ++-- ietf/liaisons/models.py | 4 ++-- ietf/mailtrigger/models.py | 4 ++-- ietf/meeting/models.py | 2 +- ietf/nomcom/models.py | 6 +++--- ietf/submit/models.py | 2 +- 7 files changed, 12 insertions(+), 12 deletions(-) diff --git a/ietf/doc/models.py b/ietf/doc/models.py index 33f2ffef0..c0ba3e4d8 100644 --- a/ietf/doc/models.py +++ b/ietf/doc/models.py @@ -53,7 +53,7 @@ class DocumentInfo(models.Model): title = models.CharField(max_length=255) states = models.ManyToManyField(State, blank=True) # plain state (Active/Expired/...), IESG state, stream state - tags = models.ManyToManyField(DocTagName, blank=True, null=True) # Revised ID Needed, ExternalParty, AD Followup, ... + tags = models.ManyToManyField(DocTagName, blank=True) # Revised ID Needed, ExternalParty, AD Followup, ... stream = models.ForeignKey(StreamName, blank=True, null=True) # IETF, IAB, IRTF, Independent Submission group = models.ForeignKey(Group, blank=True, null=True) # WG, RG, IAB, IESG, Edu, Tools diff --git a/ietf/doc/templatetags/ietf_filters.py b/ietf/doc/templatetags/ietf_filters.py index db88b4d3c..50ffb8a08 100644 --- a/ietf/doc/templatetags/ietf_filters.py +++ b/ietf/doc/templatetags/ietf_filters.py @@ -13,7 +13,7 @@ from ietf.doc.models import ConsensusDocEvent from ietf.doc.utils import get_document_content from django import template from django.conf import settings -from django.utils.html import escape, fix_ampersands +from django.utils.html import escape from django.template.defaultfilters import truncatewords_html, linebreaksbr, stringfilter, striptags, urlize from django.template import resolve_variable from django.utils.safestring import mark_safe, SafeData @@ -69,7 +69,7 @@ def parse_email_list(value): (name, email) = parseaddr(addr) if not(name): name = email - ret.append('%s' % ( fix_ampersands(email), escape(name) )) + ret.append('%s' % ( email.replace('&', '&'), escape(name) )) return mark_safe(", ".join(ret)) else: return value diff --git a/ietf/liaisons/models.py b/ietf/liaisons/models.py index 9abfe83f0..df9357423 100644 --- a/ietf/liaisons/models.py +++ b/ietf/liaisons/models.py @@ -40,7 +40,7 @@ class LiaisonStatement(models.Model): other_identifiers = models.TextField(blank=True, null=True) # Identifiers from other bodies body = models.TextField(blank=True) - tags = models.ManyToManyField(LiaisonStatementTagName, blank=True, null=True) + tags = models.ManyToManyField(LiaisonStatementTagName, blank=True) attachments = models.ManyToManyField(Document, through='LiaisonStatementAttachment', blank=True) state = models.ForeignKey(LiaisonStatementState, default='pending') @@ -212,7 +212,7 @@ class RelatedLiaisonStatement(models.Model): class LiaisonStatementGroupContacts(models.Model): - group = models.ForeignKey(Group, unique=True) + group = models.OneToOneField(Group) contacts = models.CharField(max_length=255,blank=True) cc_contacts = models.CharField(max_length=255,blank=True) diff --git a/ietf/mailtrigger/models.py b/ietf/mailtrigger/models.py index 20343c148..526b5f5dd 100644 --- a/ietf/mailtrigger/models.py +++ b/ietf/mailtrigger/models.py @@ -22,8 +22,8 @@ def clean_duplicates(addrlist): class MailTrigger(models.Model): slug = models.CharField(max_length=32, primary_key=True) desc = models.TextField(blank=True) - to = models.ManyToManyField('Recipient', null=True, blank=True, related_name='used_in_to') - cc = models.ManyToManyField('Recipient', null=True, blank=True, related_name='used_in_cc') + to = models.ManyToManyField('Recipient', blank=True, related_name='used_in_to') + cc = models.ManyToManyField('Recipient', blank=True, related_name='used_in_cc') class Meta: ordering = ["slug"] diff --git a/ietf/meeting/models.py b/ietf/meeting/models.py index 6df3235ab..3f000f803 100644 --- a/ietf/meeting/models.py +++ b/ietf/meeting/models.py @@ -416,7 +416,7 @@ class TimeSlot(models.Model): duration = TimedeltaField() location = models.ForeignKey(Room, blank=True, null=True) show_location = models.BooleanField(default=True, help_text="Show location in agenda.") - sessions = models.ManyToManyField('Session', related_name='slots', through='SchedTimeSessAssignment', null=True, blank=True, help_text=u"Scheduled session, if any.") + sessions = models.ManyToManyField('Session', related_name='slots', through='SchedTimeSessAssignment', blank=True, help_text=u"Scheduled session, if any.") modified = models.DateTimeField(auto_now=True) # diff --git a/ietf/nomcom/models.py b/ietf/nomcom/models.py index 8e1afc691..724f0662b 100644 --- a/ietf/nomcom/models.py +++ b/ietf/nomcom/models.py @@ -1,4 +1,4 @@ -# -*- coding: utf-8 -*- +# -*- coding: utf-8 -*- import os from django.db import models @@ -205,8 +205,8 @@ class Position(models.Model): class Feedback(models.Model): nomcom = models.ForeignKey('NomCom') author = models.EmailField(verbose_name='Author', blank=True) - positions = models.ManyToManyField('Position', blank=True, null=True) - nominees = models.ManyToManyField('Nominee', blank=True, null=True) + positions = models.ManyToManyField('Position', blank=True) + nominees = models.ManyToManyField('Nominee', blank=True) subject = models.TextField(verbose_name='Subject', blank=True) comments = EncryptedTextField(verbose_name='Comments') type = models.ForeignKey(FeedbackTypeName, blank=True, null=True) diff --git a/ietf/submit/models.py b/ietf/submit/models.py index 9bb3fed18..6e710cc6b 100644 --- a/ietf/submit/models.py +++ b/ietf/submit/models.py @@ -77,7 +77,7 @@ class Submission(models.Model): return Document.objects.filter(name=self.name).first() class SubmissionCheck(models.Model): - time = models.DateTimeField(auto_now=True, default=None) # The default is to make makemigrations happy + time = models.DateTimeField(auto_now=True) submission = models.ForeignKey(Submission, related_name='checks') checker = models.CharField(max_length=256, blank=True) passed = models.NullBooleanField(default=False) From ca570ae35586d4acdd5a902001eec760017a71b1 Mon Sep 17 00:00:00 2001 From: Henrik Levkowetz Date: Thu, 3 Nov 2016 20:10:09 +0000 Subject: [PATCH 04/24] Reverted an inadvertent commit of all changes. - Legacy-Id: 12253 --- ietf/doc/models.py | 2 +- ietf/doc/templatetags/ietf_filters.py | 4 ++-- ietf/liaisons/models.py | 4 ++-- ietf/mailtrigger/models.py | 4 ++-- ietf/meeting/models.py | 2 +- ietf/nomcom/models.py | 6 +++--- ietf/submit/models.py | 2 +- 7 files changed, 12 insertions(+), 12 deletions(-) diff --git a/ietf/doc/models.py b/ietf/doc/models.py index c0ba3e4d8..33f2ffef0 100644 --- a/ietf/doc/models.py +++ b/ietf/doc/models.py @@ -53,7 +53,7 @@ class DocumentInfo(models.Model): title = models.CharField(max_length=255) states = models.ManyToManyField(State, blank=True) # plain state (Active/Expired/...), IESG state, stream state - tags = models.ManyToManyField(DocTagName, blank=True) # Revised ID Needed, ExternalParty, AD Followup, ... + tags = models.ManyToManyField(DocTagName, blank=True, null=True) # Revised ID Needed, ExternalParty, AD Followup, ... stream = models.ForeignKey(StreamName, blank=True, null=True) # IETF, IAB, IRTF, Independent Submission group = models.ForeignKey(Group, blank=True, null=True) # WG, RG, IAB, IESG, Edu, Tools diff --git a/ietf/doc/templatetags/ietf_filters.py b/ietf/doc/templatetags/ietf_filters.py index 50ffb8a08..db88b4d3c 100644 --- a/ietf/doc/templatetags/ietf_filters.py +++ b/ietf/doc/templatetags/ietf_filters.py @@ -13,7 +13,7 @@ from ietf.doc.models import ConsensusDocEvent from ietf.doc.utils import get_document_content from django import template from django.conf import settings -from django.utils.html import escape +from django.utils.html import escape, fix_ampersands from django.template.defaultfilters import truncatewords_html, linebreaksbr, stringfilter, striptags, urlize from django.template import resolve_variable from django.utils.safestring import mark_safe, SafeData @@ -69,7 +69,7 @@ def parse_email_list(value): (name, email) = parseaddr(addr) if not(name): name = email - ret.append('%s' % ( email.replace('&', '&'), escape(name) )) + ret.append('%s' % ( fix_ampersands(email), escape(name) )) return mark_safe(", ".join(ret)) else: return value diff --git a/ietf/liaisons/models.py b/ietf/liaisons/models.py index df9357423..9abfe83f0 100644 --- a/ietf/liaisons/models.py +++ b/ietf/liaisons/models.py @@ -40,7 +40,7 @@ class LiaisonStatement(models.Model): other_identifiers = models.TextField(blank=True, null=True) # Identifiers from other bodies body = models.TextField(blank=True) - tags = models.ManyToManyField(LiaisonStatementTagName, blank=True) + tags = models.ManyToManyField(LiaisonStatementTagName, blank=True, null=True) attachments = models.ManyToManyField(Document, through='LiaisonStatementAttachment', blank=True) state = models.ForeignKey(LiaisonStatementState, default='pending') @@ -212,7 +212,7 @@ class RelatedLiaisonStatement(models.Model): class LiaisonStatementGroupContacts(models.Model): - group = models.OneToOneField(Group) + group = models.ForeignKey(Group, unique=True) contacts = models.CharField(max_length=255,blank=True) cc_contacts = models.CharField(max_length=255,blank=True) diff --git a/ietf/mailtrigger/models.py b/ietf/mailtrigger/models.py index 526b5f5dd..20343c148 100644 --- a/ietf/mailtrigger/models.py +++ b/ietf/mailtrigger/models.py @@ -22,8 +22,8 @@ def clean_duplicates(addrlist): class MailTrigger(models.Model): slug = models.CharField(max_length=32, primary_key=True) desc = models.TextField(blank=True) - to = models.ManyToManyField('Recipient', blank=True, related_name='used_in_to') - cc = models.ManyToManyField('Recipient', blank=True, related_name='used_in_cc') + to = models.ManyToManyField('Recipient', null=True, blank=True, related_name='used_in_to') + cc = models.ManyToManyField('Recipient', null=True, blank=True, related_name='used_in_cc') class Meta: ordering = ["slug"] diff --git a/ietf/meeting/models.py b/ietf/meeting/models.py index 3f000f803..6df3235ab 100644 --- a/ietf/meeting/models.py +++ b/ietf/meeting/models.py @@ -416,7 +416,7 @@ class TimeSlot(models.Model): duration = TimedeltaField() location = models.ForeignKey(Room, blank=True, null=True) show_location = models.BooleanField(default=True, help_text="Show location in agenda.") - sessions = models.ManyToManyField('Session', related_name='slots', through='SchedTimeSessAssignment', blank=True, help_text=u"Scheduled session, if any.") + sessions = models.ManyToManyField('Session', related_name='slots', through='SchedTimeSessAssignment', null=True, blank=True, help_text=u"Scheduled session, if any.") modified = models.DateTimeField(auto_now=True) # diff --git a/ietf/nomcom/models.py b/ietf/nomcom/models.py index 724f0662b..8e1afc691 100644 --- a/ietf/nomcom/models.py +++ b/ietf/nomcom/models.py @@ -1,4 +1,4 @@ -# -*- coding: utf-8 -*- +# -*- coding: utf-8 -*- import os from django.db import models @@ -205,8 +205,8 @@ class Position(models.Model): class Feedback(models.Model): nomcom = models.ForeignKey('NomCom') author = models.EmailField(verbose_name='Author', blank=True) - positions = models.ManyToManyField('Position', blank=True) - nominees = models.ManyToManyField('Nominee', blank=True) + positions = models.ManyToManyField('Position', blank=True, null=True) + nominees = models.ManyToManyField('Nominee', blank=True, null=True) subject = models.TextField(verbose_name='Subject', blank=True) comments = EncryptedTextField(verbose_name='Comments') type = models.ForeignKey(FeedbackTypeName, blank=True, null=True) diff --git a/ietf/submit/models.py b/ietf/submit/models.py index 6e710cc6b..9bb3fed18 100644 --- a/ietf/submit/models.py +++ b/ietf/submit/models.py @@ -77,7 +77,7 @@ class Submission(models.Model): return Document.objects.filter(name=self.name).first() class SubmissionCheck(models.Model): - time = models.DateTimeField(auto_now=True) + time = models.DateTimeField(auto_now=True, default=None) # The default is to make makemigrations happy submission = models.ForeignKey(Submission, related_name='checks') checker = models.CharField(max_length=256, blank=True) passed = models.NullBooleanField(default=False) From cfe4d2f6aa6288c69889f0f7dd16622b7a0f5e32 Mon Sep 17 00:00:00 2001 From: Henrik Levkowetz Date: Thu, 3 Nov 2016 20:11:49 +0000 Subject: [PATCH 05/24] Removed use of the fix_ampersands() function. - Legacy-Id: 12254 --- ietf/doc/templatetags/ietf_filters.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ietf/doc/templatetags/ietf_filters.py b/ietf/doc/templatetags/ietf_filters.py index db88b4d3c..50ffb8a08 100644 --- a/ietf/doc/templatetags/ietf_filters.py +++ b/ietf/doc/templatetags/ietf_filters.py @@ -13,7 +13,7 @@ from ietf.doc.models import ConsensusDocEvent from ietf.doc.utils import get_document_content from django import template from django.conf import settings -from django.utils.html import escape, fix_ampersands +from django.utils.html import escape from django.template.defaultfilters import truncatewords_html, linebreaksbr, stringfilter, striptags, urlize from django.template import resolve_variable from django.utils.safestring import mark_safe, SafeData @@ -69,7 +69,7 @@ def parse_email_list(value): (name, email) = parseaddr(addr) if not(name): name = email - ret.append('%s' % ( fix_ampersands(email), escape(name) )) + ret.append('%s' % ( email.replace('&', '&'), escape(name) )) return mark_safe(", ".join(ret)) else: return value From 87e1339924dc31995a295935ee1d9ec360586f93 Mon Sep 17 00:00:00 2001 From: Henrik Levkowetz Date: Thu, 3 Nov 2016 20:13:44 +0000 Subject: [PATCH 06/24] Fixed all the warnings emitted by the check command; mostly use of null=True on ManyToManyFields, which doesn't make sense. - Legacy-Id: 12256 --- ietf/doc/models.py | 2 +- ietf/liaisons/models.py | 4 ++-- ietf/mailtrigger/models.py | 4 ++-- ietf/meeting/models.py | 2 +- ietf/nomcom/models.py | 4 ++-- ietf/submit/models.py | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/ietf/doc/models.py b/ietf/doc/models.py index 33f2ffef0..c0ba3e4d8 100644 --- a/ietf/doc/models.py +++ b/ietf/doc/models.py @@ -53,7 +53,7 @@ class DocumentInfo(models.Model): title = models.CharField(max_length=255) states = models.ManyToManyField(State, blank=True) # plain state (Active/Expired/...), IESG state, stream state - tags = models.ManyToManyField(DocTagName, blank=True, null=True) # Revised ID Needed, ExternalParty, AD Followup, ... + tags = models.ManyToManyField(DocTagName, blank=True) # Revised ID Needed, ExternalParty, AD Followup, ... stream = models.ForeignKey(StreamName, blank=True, null=True) # IETF, IAB, IRTF, Independent Submission group = models.ForeignKey(Group, blank=True, null=True) # WG, RG, IAB, IESG, Edu, Tools diff --git a/ietf/liaisons/models.py b/ietf/liaisons/models.py index 9abfe83f0..df9357423 100644 --- a/ietf/liaisons/models.py +++ b/ietf/liaisons/models.py @@ -40,7 +40,7 @@ class LiaisonStatement(models.Model): other_identifiers = models.TextField(blank=True, null=True) # Identifiers from other bodies body = models.TextField(blank=True) - tags = models.ManyToManyField(LiaisonStatementTagName, blank=True, null=True) + tags = models.ManyToManyField(LiaisonStatementTagName, blank=True) attachments = models.ManyToManyField(Document, through='LiaisonStatementAttachment', blank=True) state = models.ForeignKey(LiaisonStatementState, default='pending') @@ -212,7 +212,7 @@ class RelatedLiaisonStatement(models.Model): class LiaisonStatementGroupContacts(models.Model): - group = models.ForeignKey(Group, unique=True) + group = models.OneToOneField(Group) contacts = models.CharField(max_length=255,blank=True) cc_contacts = models.CharField(max_length=255,blank=True) diff --git a/ietf/mailtrigger/models.py b/ietf/mailtrigger/models.py index 20343c148..526b5f5dd 100644 --- a/ietf/mailtrigger/models.py +++ b/ietf/mailtrigger/models.py @@ -22,8 +22,8 @@ def clean_duplicates(addrlist): class MailTrigger(models.Model): slug = models.CharField(max_length=32, primary_key=True) desc = models.TextField(blank=True) - to = models.ManyToManyField('Recipient', null=True, blank=True, related_name='used_in_to') - cc = models.ManyToManyField('Recipient', null=True, blank=True, related_name='used_in_cc') + to = models.ManyToManyField('Recipient', blank=True, related_name='used_in_to') + cc = models.ManyToManyField('Recipient', blank=True, related_name='used_in_cc') class Meta: ordering = ["slug"] diff --git a/ietf/meeting/models.py b/ietf/meeting/models.py index 6df3235ab..3f000f803 100644 --- a/ietf/meeting/models.py +++ b/ietf/meeting/models.py @@ -416,7 +416,7 @@ class TimeSlot(models.Model): duration = TimedeltaField() location = models.ForeignKey(Room, blank=True, null=True) show_location = models.BooleanField(default=True, help_text="Show location in agenda.") - sessions = models.ManyToManyField('Session', related_name='slots', through='SchedTimeSessAssignment', null=True, blank=True, help_text=u"Scheduled session, if any.") + sessions = models.ManyToManyField('Session', related_name='slots', through='SchedTimeSessAssignment', blank=True, help_text=u"Scheduled session, if any.") modified = models.DateTimeField(auto_now=True) # diff --git a/ietf/nomcom/models.py b/ietf/nomcom/models.py index 8e1afc691..6c975164d 100644 --- a/ietf/nomcom/models.py +++ b/ietf/nomcom/models.py @@ -205,8 +205,8 @@ class Position(models.Model): class Feedback(models.Model): nomcom = models.ForeignKey('NomCom') author = models.EmailField(verbose_name='Author', blank=True) - positions = models.ManyToManyField('Position', blank=True, null=True) - nominees = models.ManyToManyField('Nominee', blank=True, null=True) + positions = models.ManyToManyField('Position', blank=True) + nominees = models.ManyToManyField('Nominee', blank=True) subject = models.TextField(verbose_name='Subject', blank=True) comments = EncryptedTextField(verbose_name='Comments') type = models.ForeignKey(FeedbackTypeName, blank=True, null=True) diff --git a/ietf/submit/models.py b/ietf/submit/models.py index 9bb3fed18..6e710cc6b 100644 --- a/ietf/submit/models.py +++ b/ietf/submit/models.py @@ -77,7 +77,7 @@ class Submission(models.Model): return Document.objects.filter(name=self.name).first() class SubmissionCheck(models.Model): - time = models.DateTimeField(auto_now=True, default=None) # The default is to make makemigrations happy + time = models.DateTimeField(auto_now=True) submission = models.ForeignKey(Submission, related_name='checks') checker = models.CharField(max_length=256, blank=True) passed = models.NullBooleanField(default=False) From 4f2eb07fa76f6ec2865729abcf62d1f5e80bc8d1 Mon Sep 17 00:00:00 2001 From: Henrik Levkowetz Date: Thu, 3 Nov 2016 20:47:14 +0000 Subject: [PATCH 07/24] Updated proceedings_templates fixture. - Legacy-Id: 12258 --- .../fixtures/proceedings_templates.json | 1 + .../fixtures/proceedings_templates.xml | 93 ------------------- 2 files changed, 1 insertion(+), 93 deletions(-) create mode 100644 ietf/meeting/fixtures/proceedings_templates.json delete mode 100644 ietf/meeting/fixtures/proceedings_templates.xml diff --git a/ietf/meeting/fixtures/proceedings_templates.json b/ietf/meeting/fixtures/proceedings_templates.json new file mode 100644 index 000000000..a2d1da672 --- /dev/null +++ b/ietf/meeting/fixtures/proceedings_templates.json @@ -0,0 +1 @@ +[{"fields": {"group": 1, "title": "IETF 97 Proceedings Overview", "variables": null, "content": "The Internet Engineering Task Force (IETF) provides a forum for working groups to coordinate technical development of new protocols. Its most important function is the development and selection of standards within the Internet protocol suite.\n\nThe IETF began in January 1986 as a forum for technical coordination by contractors for the then US Defense Advanced Research Projects Agency (DARPA), working on the ARPANET, US Defense Data Network (DDN), and the Internet core gateway system. Since that time, the IETF has grown into a large open international community of network designers, operators, vendors, and researchers concerned with the evolution of the Internet architecture and the smooth operation of the Internet.\n\nThe IETF mission includes:\n\n* Identifying and proposing solutions to pressing operational and technical problems in the Internet\n* Specifying the development or usage of protocols and the near-term architecture, to solve technical problems for the Internet\n* Facilitating technology transfer from the Internet Research Task Force (IRTF) to the wider Internet community;and\n* Providing a forum for the exchange of relevant information within the Internet community between vendors, users, researchers, agency contractors, and network managers.\n\nTechnical activities in the IETF are addressed within working groups. All working groups are organized roughly by function into seven areas. Each area is led by one or more Area Directors who have primary responsibility for that one area of IETF activity. Together with the Chair of the IETF/IESG, these Area Directors comprise the Internet Engineering Steering Group (IESG).\n\n=================== =================================== ========================\nName Area Email\n=================== =================================== ========================\nJari Arkko IETF Chair chair@ietf.org\nJari Arkko General Area jari.arkko@piuha.net\nAlia Atlas Routing Area akatlas@gmail.com\nDeborah Brungard Routing Areas db3546@att.com\nBen Campbell Applications and Real-Time Area ben@nostrum.com\nBenoit Claise Operations and Management Area bclaise@cisco.com\nAlissa Cooper Applications and Real-Time Area alissa@cooperw.in\nSpencer Dawkins Transport Area spencerdawkins.ietf@gmail.com\nStephen Farrell Security Area stephen.farrell@cs.tcd.ie\nJoel Jaeggli Operations and Management Area joelja@bogus.com\nSuresh Krishnan Internet Area suresh.krishnan@ericsson.com\nMirja K\u00fchlewind Transport Area ietf@kuehlewind.net\nTerry Manderson Internet Area terry.manderson@icann.org\nAlexey Melnikov Applications and Real-Time Area aamelnikov@fastmail.fm\nKathleen Moriarty Security Area Kathleen.Moriarty.ietf@gmail.com\nAlvaro Retana Routing Area aretana@cisco.com\n=================== =================================== ========================\n\n\nLiaison and ex-officio members include:\n\n=================== =================================== ========================\nOlaf Kolkman IAB Chair iab-chair@iab.org\nDanny McPherson IAB Liaison danny@tcb.net\nMichelle Cotton IANA Liaison iana@iana.org\nSandy Ginoza RFC Editor Liaison rfc-editor@rfc-editor.org\nAlexa Morris IETF Secretariat Liaison exec-director@ietf.org\n=================== =================================== ========================\n\n\nThe IETF has a Secretariat, which is managed by Association Management Solutions, LLC (AMS) in Fremont, California.The IETF Executive Director is Alexa Morris (exec-director@ietf.org).\n\n\nOther personnel that provide full-time support to the Secretariat include:\n\n========================= ===================================\nSenior Meeting Planner Marcia Beaulieu\nProject Manager Stephanie McCammon\nMeeting Regsitrar Maddy Conner\nProject Manager Cindy Morgan\nProject Manager Amy Vezza\n========================= ===================================\n\nTo contact the Secretariat, please refer to the addresses and URLs provided on the IETF Secretariat Web page.\n\nThe IETF also has a general Administrative Support Activity headed by the IETF Administrative Director, Ray Pelletier iad@ietf.org\n\nThe working groups conduct their business during the tri-annual IETF meetings, at interim working group meetings, and via electronic mail on mailing lists established for each group. The tri-annual IETF meetings are 4.5 days in duration, and consist of working group sessions, training sessions, and plenary sessions. The plenary sessions include technical presentations, status reports, and an open IESG meeting.\n\nFollowing each meeting, the IETF Secretariat publishes meeting proceedings, which contain reports from all of the groups that met, as well as presentation slides, where available. The proceedings also include a summary of the standards-related activities that took place since the previous IETF meeting.\n\nMeeting minutes, working group charters (including information about the working group mailing lists), and general information on current IETF activities are available on the IETF Web site at https://www.ietf.org.\n", "path": "/meeting/proceedings/97/overview.rst", "type": "rst"}, "model": "dbtemplate.dbtemplate", "pk": 179}, {"fields": {"order": 0, "used": true, "name": "reStructuredText", "desc": ""}, "model": "name.dbtemplatetypename", "pk": "rst"}, {"fields": {"charter": null, "unused_states": [], "description": "", "parent": null, "list_email": "", "acronym": "ietf", "comments": "", "list_subscribe": "", "state": "active", "time": "2012-02-26T00:21:36", "unused_tags": [], "list_archive": "", "type": "ietf", "name": "IETF"}, "model": "group.group", "pk": 1}, {"fields": {"order": 0, "used": true, "name": "Active", "desc": ""}, "model": "name.groupstatename", "pk": "active"}, {"fields": {"order": 0, "used": true, "verbose_name": "Internet Engineering Task Force", "name": "IETF", "desc": ""}, "model": "name.grouptypename", "pk": "ietf"}] diff --git a/ietf/meeting/fixtures/proceedings_templates.xml b/ietf/meeting/fixtures/proceedings_templates.xml deleted file mode 100644 index 035a6125c..000000000 --- a/ietf/meeting/fixtures/proceedings_templates.xml +++ /dev/null @@ -1,93 +0,0 @@ - -/meeting/proceedings/defaults/overview.rstProceedings Overview TemplaterstThe Internet Engineering Task Force (IETF) provides a forum for working groups to coordinate technical development of new protocols. Its most important function is the development and selection of standards within the Internet protocol suite. - - - -The IETF began in January 1986 as a forum for technical coordination by contractors for the then US Defense Advanced Research Projects Agency (DARPA), working on the ARPANET, US Defense Data Network (DDN), and the Internet core gateway system. Since that time, the IETF has grown into a large open international community of network designers, operators, vendors, and researchers concerned with the evolution of the Internet architecture and the smooth operation of the Internet. - - - -The IETF mission includes: - - - -* Identifying and proposing solutions to pressing operational and technical problems in the Internet - -* Specifying the development or usage of protocols and the near-term architecture, to solve technical problems for the Internet - -* Facilitating technology transfer from the Internet Research Task Force (IRTF) to the wider Internet community;and - -* Providing a forum for the exchange of relevant information within the Internet community between vendors, users, researchers, agency contractors, and network managers. - - - -Technical activities in the IETF are addressed within working groups. All working groups are organized roughly by function into seven areas. Each area is led by one or more Area Directors who have primary responsibility for that one area of IETF activity. Together with the Chair of the IETF/IESG, these Area Directors comprise the Internet Engineering Steering Group (IESG). - - - -=================== =================================== ======================== -Name Area Email -=================== =================================== ======================== -Jari Arkko IETF Chair chair@ietf.org -Jari Arkko General Area jari.arkko@piuha.net -Alia Atlas Routing Area akatlas@gmail.com -Deborah Brungard Routing Areas db3546@att.com -Ben Campbell Applications and Real-Time Area ben@nostrum.com -Benoit Claise Operations and Management Area bclaise@cisco.com -Alissa Cooper Applications and Real-Time Area alissa@cooperw.in -Spencer Dawkins Transport Area spencerdawkins.ietf@gmail.com -Stephen Farrell Security Area stephen.farrell@cs.tcd.ie -Brian Haberman Internet Area brian@innovationslab.net -Joel Jaeggli Operations and Management Area joelja@bogus.com -Barry Leiba Applications and Real-Time Area barryleiba@computer.org -Terry Manderson Internet Area terry.manderson@icann.org -Kathleen Moriarty Security Area Kathleen.Moriarty.ietf@gmail.com -Alvaro Retana Routing Area aretana@cisco.com -Martin Stiemerling Transport Area mls.ietf@gmail.com -=================== =================================== ======================== - - -Liaison and ex-officio members include: - - -=================== =================================== ======================== -Olaf Kolkman IAB Chair iab-chair@iab.org -Danny McPherson IAB Liaison danny@tcb.net -Michelle Cotton IANA Liaison iana@iana.org -Sandy Ginoza RFC Editor Liaison rfc-editor@rfc-editor.org -Alexa Morris IETF Secretariat Liaison exec-director@ietf.org -=================== =================================== ======================== - - -The IETF has a Secretariat, which is managed by Association Management Solutions, LLC (AMS) in Fremont, California.The IETF Executive Director is Alexa Morris (exec-director@ietf.org). - - -Other personnel that provide full-time support to the Secretariat include: - - -========================= =================================== -Senior Meeting Planner Marcia Beaulieu -Project Manager Stephanie McCammon -Meeting Regsitrar Maddy Conner -Project Manager Cindy Morgan -Project Manager Amy Vezza -========================= =================================== - - -To contact the Secretariat, please refer to the addresses and URLs provided on the IETF Secretariat Web page. - - - -The IETF also has a general Administrative Support Activity headed by the IETF Administrative Director, Ray Pelletier iad@ietf.org - - - -The working groups conduct their business during the tri-annual IETF meetings, at interim working group meetings, and via electronic mail on mailing lists established for each group. The tri-annual IETF meetings are 4.5 days in duration, and consist of working group sessions, training sessions, and plenary sessions. The plenary sessions include technical presentations, status reports, and an open IESG meeting. - - - -Following each meeting, the IETF Secretariat publishes meeting proceedings, which contain reports from all of the groups that met, as well as presentation slides, where available. The proceedings also include a summary of the standards-related activities that took place since the previous IETF meeting. - - - -Meeting minutes, working group charters (including information about the working group mailing lists), and general information on current IETF activities are available on the IETF Web site at https://www.ietf.org.1 \ No newline at end of file From f7cf00b7ece6022a2eae58929314284b8ef85a61 Mon Sep 17 00:00:00 2001 From: Henrik Levkowetz Date: Thu, 3 Nov 2016 20:48:38 +0000 Subject: [PATCH 08/24] Use get_or_create when creating test data, to avoid duplicate key warnings. - Legacy-Id: 12259 --- ietf/utils/test_data.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ietf/utils/test_data.py b/ietf/utils/test_data.py index 54028a455..1937d451c 100644 --- a/ietf/utils/test_data.py +++ b/ietf/utils/test_data.py @@ -34,7 +34,8 @@ def create_person(group, role_name, name=None, username=None, email_address=None Role.objects.create(group=group, name_id=role_name, person=person, email=email) def create_group(**kwargs): - return Group.objects.create(state_id="active", **kwargs) + group, created = Group.objects.get_or_create(state_id="active", **kwargs) + return group def make_immutable_base_data(): """Some base data (groups, etc.) that doesn't need to be modified by From f690333ea33a741283eb5f4df559d28857d062bc Mon Sep 17 00:00:00 2001 From: Henrik Levkowetz Date: Thu, 3 Nov 2016 20:50:10 +0000 Subject: [PATCH 09/24] Formtools has been moved from django.contrib to an external package. Add it to requirements. - Legacy-Id: 12260 --- requirements.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/requirements.txt b/requirements.txt index fe52685f7..6ba24f4a9 100644 --- a/requirements.txt +++ b/requirements.txt @@ -8,6 +8,7 @@ decorator>=3.4.0 defusedxml>=0.4.1 # for TastyPie when ussing xml; not a declared dependency Django>=1.8.16,<1.9 django-bootstrap3>=5.1.1,<7.0.0 # django-bootstrap 7.0 requires django 1.8 +django-formtools>=1.0 # instead of django.contrib.formtools in 1.8 django-markup>=1.1 django-tastypie>=0.13.1 django-widget-tweaks>=1.3 From 8d1aca19cc74a701e7326c72baf80df62866bcfb Mon Sep 17 00:00:00 2001 From: Henrik Levkowetz Date: Thu, 3 Nov 2016 20:51:06 +0000 Subject: [PATCH 10/24] Rewrote the template coverage loader function to a proper template loader class. - Legacy-Id: 12261 --- ietf/utils/test_runner.py | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/ietf/utils/test_runner.py b/ietf/utils/test_runner.py index 503fc60f0..1587238cb 100644 --- a/ietf/utils/test_runner.py +++ b/ietf/utils/test_runner.py @@ -54,6 +54,7 @@ from optparse import make_option from django.conf import settings from django.template import TemplateDoesNotExist +from django.template.loaders.base import Loader as BaseLoader from django.test.runner import DiscoverRunner from django.core.management import call_command from django.core.urlresolvers import RegexURLResolver @@ -106,11 +107,14 @@ def safe_destroy_0_1(*args, **kwargs): settings.DATABASES["default"]["NAME"] = test_database_name return old_destroy(*args, **kwargs) -def template_coverage_loader(template_name, dirs): - if template_coverage_collection == True: - loaded_templates.add(str(template_name)) - raise TemplateDoesNotExist -template_coverage_loader.is_usable = True +class TemplateCoverageLoader(BaseLoader): + is_usable = True + + def load_template_source(self, template_name, dirs): + if template_coverage_collection == True: + loaded_templates.add(str(template_name)) + raise TemplateDoesNotExist + load_template_source.is_usable = True class RecordUrlsMiddleware(object): def process_request(self, request): @@ -385,7 +389,7 @@ class IetfTestRunner(DiscoverRunner): }, } - settings.TEMPLATE_LOADERS = ('ietf.utils.test_runner.template_coverage_loader',) + settings.TEMPLATE_LOADERS + settings.TEMPLATE_LOADERS = ('ietf.utils.test_runner.TemplateCoverageLoader',) + settings.TEMPLATE_LOADERS template_coverage_collection = True settings.MIDDLEWARE_CLASSES = ('ietf.utils.test_runner.RecordUrlsMiddleware',) + settings.MIDDLEWARE_CLASSES From c05d53da095ece142384f6cfe857c26bc81f90fe Mon Sep 17 00:00:00 2001 From: Henrik Levkowetz Date: Thu, 3 Nov 2016 20:52:02 +0000 Subject: [PATCH 11/24] Fixed the import path for some template classes. - Legacy-Id: 12262 --- ietf/dbtemplate/template.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ietf/dbtemplate/template.py b/ietf/dbtemplate/template.py index 3445984fb..f4276a9ef 100644 --- a/ietf/dbtemplate/template.py +++ b/ietf/dbtemplate/template.py @@ -4,7 +4,7 @@ from docutils.core import publish_string from docutils.utils import SystemMessage import debug # pyflakes:ignore -from django.template import Template as DjangoTemplate, TemplateDoesNotExist, TemplateEncodingError +from django.template.base import Template as DjangoTemplate, TemplateDoesNotExist, TemplateEncodingError from django.template.loader import BaseLoader from django.utils.encoding import smart_unicode From 90bf63f01e9cc614b493abbf97144137143e2f78 Mon Sep 17 00:00:00 2001 From: Henrik Levkowetz Date: Thu, 3 Nov 2016 20:54:35 +0000 Subject: [PATCH 12/24] Fixed the import path for formtools. - Legacy-Id: 12263 --- ietf/nomcom/forms.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ietf/nomcom/forms.py b/ietf/nomcom/forms.py index ab797e3e5..95a52e01f 100644 --- a/ietf/nomcom/forms.py +++ b/ietf/nomcom/forms.py @@ -1,6 +1,6 @@ from django.conf import settings from django import forms -from django.contrib.formtools.preview import FormPreview, AUTO_ID +from formtools.preview import FormPreview, AUTO_ID from django.shortcuts import get_object_or_404, redirect from django.utils.decorators import method_decorator from django.shortcuts import render_to_response From 1558a52c55710e51ac8db27d4e98185a747b9510 Mon Sep 17 00:00:00 2001 From: Henrik Levkowetz Date: Fri, 4 Nov 2016 19:02:40 +0000 Subject: [PATCH 13/24] django.admin.utils.get_deleted_objects() changed signature. Fixed. - Legacy-Id: 12268 --- ietf/person/utils.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ietf/person/utils.py b/ietf/person/utils.py index 2229cf962..55e7a6929 100755 --- a/ietf/person/utils.py +++ b/ietf/person/utils.py @@ -74,9 +74,9 @@ def merge_persons(source,target,stream): user = User.objects.filter(is_superuser=True).first() admin_site = admin.site using = 'default' - - deletable_objects, perms_needed, protected = admin.utils.get_deleted_objects( - objs, opts, user, admin_site, using) + + deletable_objects, model_count, perms_needed, protected = ( + admin.utils.get_deleted_objects(objs, opts, user, admin_site, using) ) if len(deletable_objects) > 1: print >>stream, "Not Deleting Person: {}({})".format(source.ascii,source.pk) From 7c7e2827972ce4b1998e37947d3ef20d7b7b9de6 Mon Sep 17 00:00:00 2001 From: Henrik Levkowetz Date: Fri, 4 Nov 2016 19:03:58 +0000 Subject: [PATCH 14/24] When using select_related, field names are now valiadate. Fixed some invalid names. - Legacy-Id: 12269 --- ietf/doc/utils_search.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ietf/doc/utils_search.py b/ietf/doc/utils_search.py index 7b9e3c159..c6a784ef6 100644 --- a/ietf/doc/utils_search.py +++ b/ietf/doc/utils_search.py @@ -12,7 +12,7 @@ def fill_in_document_table_attributes(docs): docs_dict = dict((d.pk, d) for d in docs) doc_ids = docs_dict.keys() - rfc_aliases = dict(DocAlias.objects.filter(name__startswith="rfc", document__in=doc_ids).values_list("document_id", "name")) + rfc_aliases = dict(DocAlias.objects.filter(name__startswith="rfc", document__in=doc_ids).values_list("document", "name")) # latest event cache event_types = ("published_rfc", @@ -78,9 +78,9 @@ def fill_in_document_table_attributes(docs): d.updated_by_list = [] xed_by = RelatedDocument.objects.filter(target__name__in=rfc_aliases.values(), - relationship__in=("obs", "updates")).select_related('target__document_id') + relationship__in=("obs", "updates")).select_related('target__document') rel_rfc_aliases = dict(DocAlias.objects.filter(name__startswith="rfc", - document__in=[rel.source_id for rel in xed_by]).values_list('document_id', 'name')) + document__in=[rel.source_id for rel in xed_by]).values_list('document', 'name')) for rel in xed_by: d = docs_dict[rel.target.document_id] if rel.relationship_id == "obs": @@ -100,7 +100,7 @@ def prepare_document_table(request, docs, query=None, max_results=500): if not isinstance(docs, list): # evaluate and fill in attribute results immediately to decrease # the number of queries - docs = docs.select_related("ad", "ad__person", "std_level", "intended_std_level", "group", "stream") + docs = docs.select_related("ad", "std_level", "intended_std_level", "group", "stream") docs = docs.prefetch_related("states__type", "tags") docs = list(docs[:max_results]) From 7c23d0c52e567768c65aba9835c4f803b6368e21 Mon Sep 17 00:00:00 2001 From: Henrik Levkowetz Date: Mon, 28 Nov 2016 17:47:08 +0000 Subject: [PATCH 15/24] Silenced a system check we won't always follow. - Legacy-Id: 12401 --- ietf/settings.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ietf/settings.py b/ietf/settings.py index 084a2eb09..235477173 100644 --- a/ietf/settings.py +++ b/ietf/settings.py @@ -737,6 +737,10 @@ LIST_ACCOUNT_DELAY = 60*60*25 # 25 hours ACCOUNT_REQUEST_EMAIL = 'account-request@ietf.org' +SILENCED_SYSTEM_CHECKS = [ + "fields.W342", # Setting unique=True on a ForeignKey has the same effect as using a OneToOneField. +] + # Put the production SECRET_KEY in settings_local.py, and also any other # sensitive or site-specific changes. DO NOT commit settings_local.py to svn. From 7c2a1b2ee42ce76e75a18b8986f0885d41f3640d Mon Sep 17 00:00:00 2001 From: Henrik Levkowetz Date: Mon, 28 Nov 2016 17:50:08 +0000 Subject: [PATCH 16/24] Undid a FK to o2o change we don't want to do (we have instances where the FK is None). - Legacy-Id: 12402 --- ietf/liaisons/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ietf/liaisons/models.py b/ietf/liaisons/models.py index df9357423..e501a9fea 100644 --- a/ietf/liaisons/models.py +++ b/ietf/liaisons/models.py @@ -212,7 +212,7 @@ class RelatedLiaisonStatement(models.Model): class LiaisonStatementGroupContacts(models.Model): - group = models.OneToOneField(Group) + group = models.ForeignKey(Group, unique=True, null=True) contacts = models.CharField(max_length=255,blank=True) cc_contacts = models.CharField(max_length=255,blank=True) From 671df0492aaf300ef4b83a5348df2068943bee6f Mon Sep 17 00:00:00 2001 From: Henrik Levkowetz Date: Mon, 28 Nov 2016 18:05:14 +0000 Subject: [PATCH 17/24] Fixed an issue where a queryset filter argument didn't have the right datatype. - Legacy-Id: 12403 --- ietf/doc/views_material.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ietf/doc/views_material.py b/ietf/doc/views_material.py index f24228a06..2d0fada14 100644 --- a/ietf/doc/views_material.py +++ b/ietf/doc/views_material.py @@ -38,7 +38,7 @@ class UploadMaterialForm(forms.Form): def __init__(self, doc_type, action, group, doc, *args, **kwargs): super(UploadMaterialForm, self).__init__(*args, **kwargs) - self.fields["state"].queryset = self.fields["state"].queryset.filter(type=doc_type) + self.fields["state"].queryset = self.fields["state"].queryset.filter(type__slug=doc_type.slug) self.doc_type = doc_type self.action = action From 554ec2d78c3d5f37411d46ba6cc1990564f008ca Mon Sep 17 00:00:00 2001 From: Henrik Levkowetz Date: Mon, 28 Nov 2016 21:04:15 +0000 Subject: [PATCH 18/24] Removed an unused import - Legacy-Id: 12406 --- ietf/utils/test_runner.py | 1 - 1 file changed, 1 deletion(-) diff --git a/ietf/utils/test_runner.py b/ietf/utils/test_runner.py index 1587238cb..f4ad15d9c 100644 --- a/ietf/utils/test_runner.py +++ b/ietf/utils/test_runner.py @@ -50,7 +50,6 @@ import unittest from coverage.report import Reporter from coverage.results import Numbers from coverage.misc import NotPython -from optparse import make_option from django.conf import settings from django.template import TemplateDoesNotExist From 53d68af9cd893c6bf59ca47813f08343058290bf Mon Sep 17 00:00:00 2001 From: Henrik Levkowetz Date: Mon, 28 Nov 2016 21:05:17 +0000 Subject: [PATCH 19/24] Adapted the utils template tests to the new template handling in Django 1.8. - Legacy-Id: 12407 --- ietf/utils/tests.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ietf/utils/tests.py b/ietf/utils/tests.py index bafc8b2c5..d0c4ca602 100644 --- a/ietf/utils/tests.py +++ b/ietf/utils/tests.py @@ -13,10 +13,10 @@ from email.mime.multipart import MIMEMultipart from django.conf import settings from django.core.management import call_command -from django.template import Context +from django.template import Context, engines from django.template.defaulttags import URLNode +from django.template.loader import get_template from django.templatetags.static import StaticNode -from django.template.loaders.filesystem import Loader from django.test import TestCase import debug # pyflakes:ignore @@ -109,12 +109,12 @@ class TemplateChecksTestCase(TestCase): templates = {} def setUp(self): - self.loader = Loader() self.paths = list(get_template_paths()) self.paths.sort() + self.engine = engines['django'] for path in self.paths: try: - self.templates[path], _ = self.loader.load_template(path) + self.templates[path] = get_template(path).template except Exception: pass @@ -126,7 +126,7 @@ class TemplateChecksTestCase(TestCase): for path in self.paths: if not path in self.templates: try: - self.loader.load_template(path) + get_template(path) except Exception as e: errors.append((path, e)) if errors: From e6121ac0f8b7d2dc6c607d703e7c8f78d2db336d Mon Sep 17 00:00:00 2001 From: Henrik Levkowetz Date: Mon, 28 Nov 2016 21:06:42 +0000 Subject: [PATCH 20/24] Fixed a bad filter argument found by the Django 1.8 code. - Legacy-Id: 12408 --- ietf/doc/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ietf/doc/models.py b/ietf/doc/models.py index c0ba3e4d8..6e92929fd 100644 --- a/ietf/doc/models.py +++ b/ietf/doc/models.py @@ -277,7 +277,7 @@ class DocumentInfo(models.Model): if isinstance(self, Document): return RelatedDocument.objects.filter(target__document=self, relationship__in=relationship).select_related('source') elif isinstance(self, DocHistory): - return RelatedDocHistory.objects.filter(target__document=self, relationship__in=relationship).select_related('source') + return RelatedDocHistory.objects.filter(target__document=self.doc, relationship__in=relationship).select_related('source') else: return RelatedDocument.objects.none() From cec0f338170802069eebc9fea487ddc86af815af Mon Sep 17 00:00:00 2001 From: Henrik Levkowetz Date: Mon, 28 Nov 2016 21:20:28 +0000 Subject: [PATCH 21/24] Removed unused stuff. - Legacy-Id: 12409 --- ietf/utils/tests.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ietf/utils/tests.py b/ietf/utils/tests.py index d0c4ca602..5399a807a 100644 --- a/ietf/utils/tests.py +++ b/ietf/utils/tests.py @@ -13,7 +13,7 @@ from email.mime.multipart import MIMEMultipart from django.conf import settings from django.core.management import call_command -from django.template import Context, engines +from django.template import Context from django.template.defaulttags import URLNode from django.template.loader import get_template from django.templatetags.static import StaticNode @@ -111,7 +111,6 @@ class TemplateChecksTestCase(TestCase): def setUp(self): self.paths = list(get_template_paths()) self.paths.sort() - self.engine = engines['django'] for path in self.paths: try: self.templates[path] = get_template(path).template From be272a019a07ffecfb649916ba41d651ce84d9f6 Mon Sep 17 00:00:00 2001 From: Henrik Levkowetz Date: Mon, 5 Dec 2016 12:53:21 +0000 Subject: [PATCH 22/24] Changed settings to use the new TEMPLATES dictionary instead of the deprecated individual TEMPLATE_* settings. - Legacy-Id: 12444 --- ietf/settings.py | 65 +++++++++++++++++++++++++++--------------------- 1 file changed, 36 insertions(+), 29 deletions(-) diff --git a/ietf/settings.py b/ietf/settings.py index 235477173..1c002ecf1 100644 --- a/ietf/settings.py +++ b/ietf/settings.py @@ -21,7 +21,6 @@ from ietf import __version__ import debug DEBUG = True -TEMPLATE_DEBUG = DEBUG debug.debug = DEBUG # Valid values: @@ -216,13 +215,38 @@ SESSION_SAVE_EVERY_REQUEST = True PREFERENCES_COOKIE_AGE = 60 * 60 * 24 * 365 * 50 # Age of cookie, in seconds: 50 years -TEMPLATE_LOADERS = ( - ('django.template.loaders.cached.Loader', ( - 'django.template.loaders.filesystem.Loader', - 'django.template.loaders.app_directories.Loader', - )), - 'ietf.dbtemplate.template.Loader', -) +TEMPLATES = [ + { + 'BACKEND': 'django.template.backends.django.DjangoTemplates', + 'DIRS': [ + BASE_DIR + "/templates", + BASE_DIR + "/secr/templates", + ], + 'OPTIONS': { + 'context_processors': [ + 'django.contrib.auth.context_processors.auth', + 'django.template.context_processors.debug', + 'django.template.context_processors.i18n', + 'django.template.context_processors.request', + 'django.template.context_processors.media', + #'django.template.context_processors.tz', + 'django.contrib.messages.context_processors.messages', + 'ietf.context_processors.server_mode', + 'ietf.context_processors.debug_mark_queries_from_view', + 'ietf.context_processors.revision_info', + 'ietf.secr.context_processors.secr_revision_info', + 'ietf.context_processors.rfcdiff_base_url', + ], + 'loaders': [ + ('django.template.loaders.cached.Loader', ( + 'django.template.loaders.filesystem.Loader', + 'django.template.loaders.app_directories.Loader', + )), + 'ietf.dbtemplate.template.Loader', + ] + }, + }, +] MIDDLEWARE_CLASSES = ( 'django.middleware.csrf.CsrfViewMiddleware', @@ -240,25 +264,6 @@ MIDDLEWARE_CLASSES = ( ROOT_URLCONF = 'ietf.urls' -TEMPLATE_DIRS = ( - BASE_DIR + "/templates", - BASE_DIR + "/secr/templates", -) - -TEMPLATE_CONTEXT_PROCESSORS = ( - 'django.contrib.auth.context_processors.auth', - 'django.core.context_processors.debug', - 'django.core.context_processors.i18n', - 'django.core.context_processors.request', - 'django.core.context_processors.media', - 'django.contrib.messages.context_processors.messages', - 'ietf.context_processors.server_mode', - 'ietf.context_processors.debug_mark_queries_from_view', - 'ietf.context_processors.revision_info', - 'ietf.secr.context_processors.secr_revision_info', - 'ietf.context_processors.rfcdiff_base_url', -) - # Additional locations of static files (in addition to each app's static/ dir) STATICFILES_DIRS = ( os.path.join(BASE_DIR, 'static'), @@ -755,7 +760,7 @@ for app in INSTALLED_APPS: # Add DEV_APPS to INSTALLED_APPS INSTALLED_APPS += DEV_APPS MIDDLEWARE_CLASSES += DEV_MIDDLEWARE_CLASSES -TEMPLATE_CONTEXT_PROCESSORS += DEV_TEMPLATE_CONTEXT_PROCESSORS +TEMPLATES[0]['OPTIONS']['context_processors'] += DEV_TEMPLATE_CONTEXT_PROCESSORS # We provide a secret key only for test and development modes. It's @@ -764,7 +769,9 @@ TEMPLATE_CONTEXT_PROCESSORS += DEV_TEMPLATE_CONTEXT_PROCESSORS # publicly available, for instance from the source repository. if SERVER_MODE != 'production': # stomp out the cached template loader, it's annoying - TEMPLATE_LOADERS = tuple(l for e in TEMPLATE_LOADERS for l in (e[1] if isinstance(e, tuple) and "cached.Loader" in e[0] else (e,))) + loaders = TEMPLATES[0]['OPTIONS']['loaders'] + loaders = tuple(l for e in loaders for l in (e[1] if isinstance(e, tuple) and "cached.Loader" in e[0] else (e,))) + TEMPLATES[0]['OPTIONS']['loaders'] = loaders CACHES = { 'default': { From cfd898b767de9d72450f21d5f5775db76942f0e4 Mon Sep 17 00:00:00 2001 From: Henrik Levkowetz Date: Mon, 5 Dec 2016 12:55:20 +0000 Subject: [PATCH 23/24] Updated the proceedings_templates fixture to provide the base proceedings template needed by tests, instead of a copy already instantiated for a specific meeting. - Legacy-Id: 12445 --- .../fixtures/proceedings_templates.json | 66 ++++++++++++++++++- 1 file changed, 65 insertions(+), 1 deletion(-) diff --git a/ietf/meeting/fixtures/proceedings_templates.json b/ietf/meeting/fixtures/proceedings_templates.json index a2d1da672..1594debff 100644 --- a/ietf/meeting/fixtures/proceedings_templates.json +++ b/ietf/meeting/fixtures/proceedings_templates.json @@ -1 +1,65 @@ -[{"fields": {"group": 1, "title": "IETF 97 Proceedings Overview", "variables": null, "content": "The Internet Engineering Task Force (IETF) provides a forum for working groups to coordinate technical development of new protocols. Its most important function is the development and selection of standards within the Internet protocol suite.\n\nThe IETF began in January 1986 as a forum for technical coordination by contractors for the then US Defense Advanced Research Projects Agency (DARPA), working on the ARPANET, US Defense Data Network (DDN), and the Internet core gateway system. Since that time, the IETF has grown into a large open international community of network designers, operators, vendors, and researchers concerned with the evolution of the Internet architecture and the smooth operation of the Internet.\n\nThe IETF mission includes:\n\n* Identifying and proposing solutions to pressing operational and technical problems in the Internet\n* Specifying the development or usage of protocols and the near-term architecture, to solve technical problems for the Internet\n* Facilitating technology transfer from the Internet Research Task Force (IRTF) to the wider Internet community;and\n* Providing a forum for the exchange of relevant information within the Internet community between vendors, users, researchers, agency contractors, and network managers.\n\nTechnical activities in the IETF are addressed within working groups. All working groups are organized roughly by function into seven areas. Each area is led by one or more Area Directors who have primary responsibility for that one area of IETF activity. Together with the Chair of the IETF/IESG, these Area Directors comprise the Internet Engineering Steering Group (IESG).\n\n=================== =================================== ========================\nName Area Email\n=================== =================================== ========================\nJari Arkko IETF Chair chair@ietf.org\nJari Arkko General Area jari.arkko@piuha.net\nAlia Atlas Routing Area akatlas@gmail.com\nDeborah Brungard Routing Areas db3546@att.com\nBen Campbell Applications and Real-Time Area ben@nostrum.com\nBenoit Claise Operations and Management Area bclaise@cisco.com\nAlissa Cooper Applications and Real-Time Area alissa@cooperw.in\nSpencer Dawkins Transport Area spencerdawkins.ietf@gmail.com\nStephen Farrell Security Area stephen.farrell@cs.tcd.ie\nJoel Jaeggli Operations and Management Area joelja@bogus.com\nSuresh Krishnan Internet Area suresh.krishnan@ericsson.com\nMirja K\u00fchlewind Transport Area ietf@kuehlewind.net\nTerry Manderson Internet Area terry.manderson@icann.org\nAlexey Melnikov Applications and Real-Time Area aamelnikov@fastmail.fm\nKathleen Moriarty Security Area Kathleen.Moriarty.ietf@gmail.com\nAlvaro Retana Routing Area aretana@cisco.com\n=================== =================================== ========================\n\n\nLiaison and ex-officio members include:\n\n=================== =================================== ========================\nOlaf Kolkman IAB Chair iab-chair@iab.org\nDanny McPherson IAB Liaison danny@tcb.net\nMichelle Cotton IANA Liaison iana@iana.org\nSandy Ginoza RFC Editor Liaison rfc-editor@rfc-editor.org\nAlexa Morris IETF Secretariat Liaison exec-director@ietf.org\n=================== =================================== ========================\n\n\nThe IETF has a Secretariat, which is managed by Association Management Solutions, LLC (AMS) in Fremont, California.The IETF Executive Director is Alexa Morris (exec-director@ietf.org).\n\n\nOther personnel that provide full-time support to the Secretariat include:\n\n========================= ===================================\nSenior Meeting Planner Marcia Beaulieu\nProject Manager Stephanie McCammon\nMeeting Regsitrar Maddy Conner\nProject Manager Cindy Morgan\nProject Manager Amy Vezza\n========================= ===================================\n\nTo contact the Secretariat, please refer to the addresses and URLs provided on the IETF Secretariat Web page.\n\nThe IETF also has a general Administrative Support Activity headed by the IETF Administrative Director, Ray Pelletier iad@ietf.org\n\nThe working groups conduct their business during the tri-annual IETF meetings, at interim working group meetings, and via electronic mail on mailing lists established for each group. The tri-annual IETF meetings are 4.5 days in duration, and consist of working group sessions, training sessions, and plenary sessions. The plenary sessions include technical presentations, status reports, and an open IESG meeting.\n\nFollowing each meeting, the IETF Secretariat publishes meeting proceedings, which contain reports from all of the groups that met, as well as presentation slides, where available. The proceedings also include a summary of the standards-related activities that took place since the previous IETF meeting.\n\nMeeting minutes, working group charters (including information about the working group mailing lists), and general information on current IETF activities are available on the IETF Web site at https://www.ietf.org.\n", "path": "/meeting/proceedings/97/overview.rst", "type": "rst"}, "model": "dbtemplate.dbtemplate", "pk": 179}, {"fields": {"order": 0, "used": true, "name": "reStructuredText", "desc": ""}, "model": "name.dbtemplatetypename", "pk": "rst"}, {"fields": {"charter": null, "unused_states": [], "description": "", "parent": null, "list_email": "", "acronym": "ietf", "comments": "", "list_subscribe": "", "state": "active", "time": "2012-02-26T00:21:36", "unused_tags": [], "list_archive": "", "type": "ietf", "name": "IETF"}, "model": "group.group", "pk": 1}, {"fields": {"order": 0, "used": true, "name": "Active", "desc": ""}, "model": "name.groupstatename", "pk": "active"}, {"fields": {"order": 0, "used": true, "verbose_name": "Internet Engineering Task Force", "name": "IETF", "desc": ""}, "model": "name.grouptypename", "pk": "ietf"}] +[ + { + "fields": { + "group": 1, + "title": "IETF 97 Proceedings Overview", + "variables": null, + "content": "The Internet Engineering Task Force (IETF) provides a forum for working groups to coordinate technical development of new protocols. Its most important function is the development and selection of standards within the Internet protocol suite.\n\nThe IETF began in January 1986 as a forum for technical coordination by contractors for the then US Defense Advanced Research Projects Agency (DARPA), working on the ARPANET, US Defense Data Network (DDN), and the Internet core gateway system. Since that time, the IETF has grown into a large open international community of network designers, operators, vendors, and researchers concerned with the evolution of the Internet architecture and the smooth operation of the Internet.\n\nThe IETF mission includes:\n\n* Identifying and proposing solutions to pressing operational and technical problems in the Internet\n* Specifying the development or usage of protocols and the near-term architecture, to solve technical problems for the Internet\n* Facilitating technology transfer from the Internet Research Task Force (IRTF) to the wider Internet community;and\n* Providing a forum for the exchange of relevant information within the Internet community between vendors, users, researchers, agency contractors, and network managers.\n\nTechnical activities in the IETF are addressed within working groups. All working groups are organized roughly by function into seven areas. Each area is led by one or more Area Directors who have primary responsibility for that one area of IETF activity. Together with the Chair of the IETF/IESG, these Area Directors comprise the Internet Engineering Steering Group (IESG).\n\n=================== =================================== ========================\nName Area Email\n=================== =================================== ========================\nJari Arkko IETF Chair chair@ietf.org\nJari Arkko General Area jari.arkko@piuha.net\nAlia Atlas Routing Area akatlas@gmail.com\nDeborah Brungard Routing Areas db3546@att.com\nBen Campbell Applications and Real-Time Area ben@nostrum.com\nBenoit Claise Operations and Management Area bclaise@cisco.com\nAlissa Cooper Applications and Real-Time Area alissa@cooperw.in\nSpencer Dawkins Transport Area spencerdawkins.ietf@gmail.com\nStephen Farrell Security Area stephen.farrell@cs.tcd.ie\nJoel Jaeggli Operations and Management Area joelja@bogus.com\nSuresh Krishnan Internet Area suresh.krishnan@ericsson.com\nMirja Kühlewind Transport Area ietf@kuehlewind.net\nTerry Manderson Internet Area terry.manderson@icann.org\nAlexey Melnikov Applications and Real-Time Area aamelnikov@fastmail.fm\nKathleen Moriarty Security Area Kathleen.Moriarty.ietf@gmail.com\nAlvaro Retana Routing Area aretana@cisco.com\n=================== =================================== ========================\n\n\nLiaison and ex-officio members include:\n\n=================== =================================== ========================\nOlaf Kolkman IAB Chair iab-chair@iab.org\nDanny McPherson IAB Liaison danny@tcb.net\nMichelle Cotton IANA Liaison iana@iana.org\nSandy Ginoza RFC Editor Liaison rfc-editor@rfc-editor.org\nAlexa Morris IETF Secretariat Liaison exec-director@ietf.org\n=================== =================================== ========================\n\n\nThe IETF has a Secretariat, which is managed by Association Management Solutions, LLC (AMS) in Fremont, California.The IETF Executive Director is Alexa Morris (exec-director@ietf.org).\n\n\nOther personnel that provide full-time support to the Secretariat include:\n\n========================= ===================================\nSenior Meeting Planner Marcia Beaulieu\nProject Manager Stephanie McCammon\nMeeting Regsitrar Maddy Conner\nProject Manager Cindy Morgan\nProject Manager Amy Vezza\n========================= ===================================\n\nTo contact the Secretariat, please refer to the addresses and URLs provided on the IETF Secretariat Web page.\n\nThe IETF also has a general Administrative Support Activity headed by the IETF Administrative Director, Ray Pelletier iad@ietf.org\n\nThe working groups conduct their business during the tri-annual IETF meetings, at interim working group meetings, and via electronic mail on mailing lists established for each group. The tri-annual IETF meetings are 4.5 days in duration, and consist of working group sessions, training sessions, and plenary sessions. The plenary sessions include technical presentations, status reports, and an open IESG meeting.\n\nFollowing each meeting, the IETF Secretariat publishes meeting proceedings, which contain reports from all of the groups that met, as well as presentation slides, where available. The proceedings also include a summary of the standards-related activities that took place since the previous IETF meeting.\n\nMeeting minutes, working group charters (including information about the working group mailing lists), and general information on current IETF activities are available on the IETF Web site at https://www.ietf.org.\n", + "path": "/meeting/proceedings/defaults/overview.rst", + "type": "rst" + }, + "model": "dbtemplate.dbtemplate", + "pk": 179 + }, + { + "fields": { + "order": 0, + "used": true, + "name": "reStructuredText", + "desc": "" + }, + "model": "name.dbtemplatetypename", + "pk": "rst" + }, + { + "fields": { + "charter": null, + "unused_states": [], + "description": "", + "parent": null, + "list_email": "", + "acronym": "ietf", + "comments": "", + "list_subscribe": "", + "state": "active", + "time": "2012-02-26T00:21:36", + "unused_tags": [], + "list_archive": "", + "type": "ietf", + "name": "IETF" + }, + "model": "group.group", + "pk": 1 + }, + { + "fields": { + "order": 0, + "used": true, + "name": "Active", + "desc": "" + }, + "model": "name.groupstatename", + "pk": "active" + }, + { + "fields": { + "order": 0, + "used": true, + "verbose_name": "Internet Engineering Task Force", + "name": "IETF", + "desc": "" + }, + "model": "name.grouptypename", + "pk": "ietf" + } +] From b897519fffde12dd0e7d1ed0b9a143fdffe20561 Mon Sep 17 00:00:00 2001 From: Henrik Levkowetz Date: Mon, 5 Dec 2016 12:56:53 +0000 Subject: [PATCH 24/24] Changed the test runner to use the verbosity set on the command line when loading fixtures. - Legacy-Id: 12446 --- ietf/utils/test_runner.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ietf/utils/test_runner.py b/ietf/utils/test_runner.py index f4ad15d9c..97ee5ae6f 100644 --- a/ietf/utils/test_runner.py +++ b/ietf/utils/test_runner.py @@ -84,7 +84,7 @@ def safe_create_1(self, verbosity, *args, **kwargs): if settings.GLOBAL_TEST_FIXTURES: print " Loading global test fixtures: %s" % ", ".join(settings.GLOBAL_TEST_FIXTURES) loadable = [f for f in settings.GLOBAL_TEST_FIXTURES if "." not in f] - call_command('loaddata', *loadable, verbosity=0, commit=False, database="default") + call_command('loaddata', *loadable, verbosity=verbosity, commit=False, database="default") for f in settings.GLOBAL_TEST_FIXTURES: if f not in loadable: