Changed the state shown in all_id.txt for drafts which have entered IESG processing, but then been replaced, to show as 'Replaced' instead of 'In IESG Processing'. This is consistent with how they are shown in all_id2.txt.

- Legacy-Id: 12527
This commit is contained in:
Henrik Levkowetz 2016-12-15 10:36:15 +00:00
parent 3c812b04cb
commit e3c6e0ac6b
31 changed files with 69 additions and 63 deletions

View file

@ -133,8 +133,8 @@ def autodiscover():
may want.
"""
from importlib import import_module
from django.conf import settings
from django.utils.importlib import import_module
from django.utils.module_loading import module_has_submodule
for app in settings.INSTALLED_APPS:

View file

@ -2,10 +2,10 @@ import os
import sys
import json
from django.apps import apps
from django.test import Client
from django.conf import settings
from django.utils.importlib import import_module
from django.db import models
from tastypie.exceptions import BadRequest
from tastypie.test import ResourceTestCaseMixin
@ -82,7 +82,8 @@ class TastypieApiTestCase(ResourceTestCaseMixin, TestCase):
self.assertValidJSONResponse(r)
app_resources = json.loads(r.content)
self._assertCallbackReturnsSameJSON("/api/v1/%s/"%name, app_resources)
model_list = models.get_models(app.models)
model_list = apps.get_models(app.models)
for model in model_list:
if not model._meta.model_name in app_resources.keys():
#print("There doesn't seem to be any resource for model %s.models.%s"%(app.__name__,model.__name__,))

View file

@ -8,14 +8,14 @@ from django.shortcuts import get_object_or_404
from ietf.group.models import Group
urlpatterns = patterns('',
(r'^$', RedirectView.as_view(url='/doc/')),
(r'^all/$', RedirectView.as_view(url='/doc/all/')),
(r'^rfc/$', RedirectView.as_view(url='/doc/all/#rfc')),
(r'^dead/$', RedirectView.as_view(url='/doc/all/#expired')),
(r'^current/$', RedirectView.as_view(url='/doc/active/')),
(r'^(?P<object_id>\d+)/(related/)?$', RedirectView.as_view(url='/doc/')),
(r'^(?P<name>[^/]+)/(related/)?$', RedirectView.as_view(url='/doc/%(name)s/')),
(r'^$', RedirectView.as_view(url='/doc/', permanent=True)),
(r'^all/$', RedirectView.as_view(url='/doc/all/', permanent=True)),
(r'^rfc/$', RedirectView.as_view(url='/doc/all/#rfc', permanent=True)),
(r'^dead/$', RedirectView.as_view(url='/doc/all/#expired', permanent=True)),
(r'^current/$', RedirectView.as_view(url='/doc/active/', permanent=True)),
(r'^(?P<object_id>\d+)/(related/)?$', RedirectView.as_view(url='/doc/', permanent=True)),
(r'^(?P<name>[^/]+)/(related/)?$', RedirectView.as_view(url='/doc/%(name)s/', permanent=True)),
(r'^wgid/(?P<id>\d+)/$', lambda request, id: HttpResponsePermanentRedirect("/wg/%s/" % get_object_or_404(Group, id=id).acronym)),
(r'^wg/(?P<acronym>[^/]+)/$', RedirectView.as_view(url='/wg/%(acronym)s/')),
(r'^all_id(?:_txt)?.html$', RedirectView.as_view(url='https://www.ietf.org/id/all_id.txt')),
(r'^wg/(?P<acronym>[^/]+)/$', RedirectView.as_view(url='/wg/%(acronym)s/', permanent=True)),
(r'^all_id(?:_txt)?.html$', RedirectView.as_view(url='https://www.ietf.org/id/all_id.txt', permanent=True)),
)

View file

@ -2,12 +2,12 @@ from django.conf.urls import patterns
from django.views.generic import RedirectView
urlpatterns = patterns('',
(r'^help/(?:sub)?state/(?:\d+/)?$', RedirectView.as_view(url='/doc/help/state/draft-iesg/')),
(r'^help/evaluation/$', RedirectView.as_view(url='https://www.ietf.org/iesg/voting-procedures.html')),
(r'^status/$', RedirectView.as_view(url='/doc/iesg/')),
(r'^status/last-call/$', RedirectView.as_view(url='/doc/iesg/last-call/')),
(r'^rfc0*(?P<rfc_number>\d+)/$', RedirectView.as_view(url='/doc/rfc%(rfc_number)s/')),
(r'^(?P<name>[^/]+)/$', RedirectView.as_view(url='/doc/%(name)s/')),
(r'^(?P<name>[^/]+)/comment/\d+/$', RedirectView.as_view(url='/doc/%(name)s/history/')),
(r'^$', RedirectView.as_view(url='/doc/')),
(r'^help/(?:sub)?state/(?:\d+/)?$', RedirectView.as_view(url='/doc/help/state/draft-iesg/', permanent=True)),
(r'^help/evaluation/$', RedirectView.as_view(url='https://www.ietf.org/iesg/voting-procedures.html', permanent=True)),
(r'^status/$', RedirectView.as_view(url='/doc/iesg/', permanent=True)),
(r'^status/last-call/$', RedirectView.as_view(url='/doc/iesg/last-call/', permanent=True)),
(r'^rfc0*(?P<rfc_number>\d+)/$', RedirectView.as_view(url='/doc/rfc%(rfc_number)s/', permanent=True)),
(r'^(?P<name>[^/]+)/$', RedirectView.as_view(url='/doc/%(name)s/', permanent=True)),
(r'^(?P<name>[^/]+)/comment/\d+/$', RedirectView.as_view(url='/doc/%(name)s/history/', permanent=True)),
(r'^$', RedirectView.as_view(url='/doc/', permanent=True)),
)

View file

@ -769,7 +769,7 @@ def approve_ballot(request, name):
if ballot_writeup_event.pk == None:
ballot_writeup_event.save()
if new_state.slug == "ann" and new_state.slug != prev_state.slug and not request.REQUEST.get("skiprfceditorpost"):
if new_state.slug == "ann" and new_state.slug != prev_state.slug and not request.POST.get("skiprfceditorpost"):
# start by notifying the RFC Editor
import ietf.sync.rfceditor
response, error = ietf.sync.rfceditor.post_approved_draft(settings.RFC_EDITOR_SYNC_NOTIFICATION_URL, doc.name)

View file

@ -1152,7 +1152,7 @@ def request_publication(request, name):
if form.is_valid():
events = []
if not request.REQUEST.get("skiprfceditorpost"):
if not request.POST.get("skiprfceditorpost"):
# start by notifying the RFC Editor
import ietf.sync.rfceditor
response, error = ietf.sync.rfceditor.post_approved_draft(settings.RFC_EDITOR_SYNC_NOTIFICATION_URL, doc.name)

View file

@ -11,7 +11,7 @@ from ietf.meeting.feeds import LatestMeetingMaterialFeed
urlpatterns = patterns(
'',
(r'^comments/(?P<remainder>.*)/$', RedirectView.as_view(url='/feed/document-changes/%(remainder)s/')),
(r'^comments/(?P<remainder>.*)/$', RedirectView.as_view(url='/feed/document-changes/%(remainder)s/', permanent=True)),
(r'^document-changes/%(name)s/$' % settings.URL_REGEXPS, DocumentChangesFeed()),
(r'^last-call/$', InLastCallFeed()),
(r'^group-changes/%(acronym)s/$' % settings.URL_REGEXPS, GroupChangesFeed()),

View file

@ -8,15 +8,15 @@ from ietf.group import views, views_edit
urlpatterns = patterns('',
(r'^$', views.active_groups),
(r'^summary.txt', RedirectView.as_view(url='/wg/1wg-summary.txt')),
(r'^summary-by-area.txt', RedirectView.as_view(url='/wg/1wg-summary.txt')),
(r'^summary-by-acronym.txt', RedirectView.as_view(url='/wg/1wg-summary-by-acronym.txt')),
(r'^summary.txt', RedirectView.as_view(url='/wg/1wg-summary.txt', permanent=True)),
(r'^summary-by-area.txt', RedirectView.as_view(url='/wg/1wg-summary.txt', permanent=True)),
(r'^summary-by-acronym.txt', RedirectView.as_view(url='/wg/1wg-summary-by-acronym.txt', permanent=True)),
(r'^1wg-summary.txt', views.wg_summary_area),
(r'^1wg-summary-by-acronym.txt', views.wg_summary_acronym),
(r'^1wg-charters.txt', views.wg_charters),
(r'^1wg-charters-by-acronym.txt', views.wg_charters_by_acronym),
(r'^chartering/$', RedirectView.as_view(url='/group/chartering/')),
(r'^chartering/create/$', RedirectView.as_view(url='/group/chartering/create/%(group_type)s/')),
(r'^chartering/$', RedirectView.as_view(url='/group/chartering/', permanent=True)),
(r'^chartering/create/$', RedirectView.as_view(url='/group/chartering/create/%(group_type)s/', permanent=True)),
(r'^bofs/$', views.bofs),
(r'^email-aliases/$', 'ietf.group.views.email_aliases'),
(r'^bofs/create/$', views_edit.edit, {'action': "create", }, "bof_create"),

View file

@ -44,7 +44,7 @@ def all_id_txt():
inactive_states = ["pub", "watching", "dead"]
in_iesg_process = all_ids.exclude(states=State.objects.get(type="draft", slug="rfc")).filter(states__in=list(State.objects.filter(type="draft-iesg").exclude(slug__in=inactive_states))).only("name", "rev")
in_iesg_process = all_ids.exclude(states=State.objects.filter(type="draft", slug__in=["rfc","repl"])).filter(states__in=list(State.objects.filter(type="draft-iesg").exclude(slug__in=inactive_states))).only("name", "rev")
# handle those actively in the IESG process
for d in in_iesg_process:

View file

@ -37,9 +37,9 @@ from django.views.generic import RedirectView
from django.conf import settings
urlpatterns = patterns('',
(r'^telechat/.*$', RedirectView.as_view(url='https://www.ietf.org/iesg/minutes.html')),
(r'^ann/(?:ind|new|prev)/$', RedirectView.as_view(url="/iesg/decisions/", permanent=True )),
(r'^telechatdates/$', RedirectView.as_view(url='/admin/iesg/telechatdate/')),
(r'^telechat/.*$', RedirectView.as_view(url='https://www.ietf.org/iesg/minutes.html', permanent=True)),
(r'^ann/(?:ind|new|prev)/$', RedirectView.as_view(url="/iesg/decisions/", permanent=True)),
(r'^telechatdates/$', RedirectView.as_view(url='/admin/iesg/telechatdate/', permanent=True)),
(r'^decisions/(?:(?P<year>[0-9]{4})/)?$', "ietf.iesg.views.review_decisions"),
(r'^agenda/(?:%(date)s/)?$' % settings.URL_REGEXPS, "ietf.iesg.views.agenda"),

View file

@ -7,7 +7,7 @@ from django.core.urlresolvers import reverse_lazy
urlpatterns = patterns('ietf.ipr.views',
url(r'^$', 'showlist', name='ipr_showlist'),
(r'^about/$', 'about'),
url(r'^admin/$', RedirectView.as_view(url=reverse_lazy('ipr_admin',kwargs={'state':'pending'})),name="ipr_admin_main"),
url(r'^admin/$', RedirectView.as_view(url=reverse_lazy('ipr_admin',kwargs={'state':'pending'}), permanent=True),name="ipr_admin_main"),
url(r'^admin/(?P<state>pending|removed|parked)/$', 'admin', name='ipr_admin'),
url(r'^ajax/search/$', 'ajax_search', name='ipr_ajax_search'),
url(r'^by-draft/$', 'by_draft_txt'),
@ -21,7 +21,7 @@ urlpatterns = patterns('ietf.ipr.views',
url(r'^(?P<id>\d+)/notify/(?P<type>update|posted)/$', 'notify', name='ipr_notify'),
url(r'^(?P<id>\d+)/post/$', 'post', name='ipr_post'),
url(r'^(?P<id>\d+)/state/$', 'state', name='ipr_state'),
(r'^update/$', RedirectView.as_view(url=reverse_lazy('ipr_showlist'))),
(r'^update/$', RedirectView.as_view(url=reverse_lazy('ipr_showlist'), permanent=True)),
url(r'^update/(?P<id>\d+)/$', 'update', name='ipr_update'),
url(r'^new-(?P<type>(specific|generic|third-party))/$', 'new', name='ipr_new'),
url(r'^search/$', 'search', name="ipr_search"),

View file

@ -8,7 +8,7 @@ urlpatterns = patterns('',
url(r'^help/fields/$', TemplateView.as_view(template_name='liaisons/field_help.html'), name='liaisons_field_help'),
(r'^help/from_ietf/$', TemplateView.as_view(template_name='liaisons/guide_from_ietf.html')),
(r'^help/to_ietf/$', TemplateView.as_view(template_name='liaisons/guide_to_ietf.html')),
(r'^managers/$', RedirectView.as_view(url='https://www.ietf.org/liaison/managers.html')),
(r'^managers/$', RedirectView.as_view(url='https://www.ietf.org/liaison/managers.html', permanent=True)),
)
# AJAX views

View file

@ -5,7 +5,7 @@ from django.views.generic import RedirectView
urlpatterns = patterns('',
(r'^wg/$', 'ietf.mailinglists.views.groups'),
(r'^nonwg/$', RedirectView.as_view(url='https://www.ietf.org/list/nonwg.html')),
(r'^nonwg/update/$', RedirectView.as_view(url='https://www.ietf.org/list/nonwg.html')),
(r'^request/$', RedirectView.as_view(url='https://www.ietf.org/list/request.html')),
(r'^nonwg/$', RedirectView.as_view(url='https://www.ietf.org/list/nonwg.html', permanent=True)),
(r'^nonwg/update/$', RedirectView.as_view(url='https://www.ietf.org/list/nonwg.html', permanent=True)),
(r'^request/$', RedirectView.as_view(url='https://www.ietf.org/list/request.html', permanent=True)),
)

View file

@ -1,10 +1,14 @@
#!/usr/bin/env python
import warnings
warnings.filterwarnings("ignore",category=DeprecationWarning)
import os
import sys
import warnings
warnings.simplefilter("always", DeprecationWarning)
warnings.filterwarnings("ignore", message="Passing callable arguments to queryset is deprecated.", module="django.db.models.sql.query", lineno=1156)
warnings.filterwarnings("ignore", message="`MergeDict` is deprecated, use `dict.update()` instead.", module="django.core.handlers.wsgi", lineno=126)
warnings.filterwarnings("ignore", message="The app_mod argument of get_models is deprecated.", module="django.utils.lru_cache", lineno=101)
warnings.filterwarnings("ignore", message="Report.file_reporters will no longer be available in Coverage.py 4.2", module="coverage.report", lineno=43)
path = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
if not path in sys.path:

View file

@ -96,7 +96,7 @@ def materials(request, num=None):
cut_off_date = meeting.get_submission_cut_off_date()
cor_cut_off_date = meeting.get_submission_correction_date()
now = datetime.date.today()
if settings.SERVER_MODE != 'production' and '_testoverride' in request.REQUEST:
if settings.SERVER_MODE != 'production' and '_testoverride' in request.GET:
pass
elif now > cor_cut_off_date:
return render(request, "meeting/materials_upload_closed.html", {

View file

@ -17,14 +17,18 @@ def redirect(request, path="", script=""):
#
# First look for flag items, stored in the database
# as a command with a leading "^".
if request.method == 'POST':
rparam = request.POST
else:
rparam = request.GET
for flag in redir.commands.all().filter(command__startswith='^'):
fc = flag.command[1:].split("^")
if len(fc) > 1:
if request.REQUEST.get('command') != fc[1]:
if rparam.get('command') != fc[1]:
continue
if request.REQUEST.has_key(fc[0]):
if rparam.has_key(fc[0]):
remove_args.append(fc[0])
num = re.match('(\d+)', request.REQUEST[fc[0]])
num = re.match('(\d+)', rparam[fc[0]])
if (num and int(num.group(1))) or (num is None):
cmd = flag
break
@ -33,7 +37,7 @@ def redirect(request, path="", script=""):
# for an exact match for the command= parameter.
if cmd is None:
try:
cmd = redir.commands.all().get(command=request.REQUEST['command'])
cmd = redir.commands.all().get(command=rparam['command'])
except Command.DoesNotExist:
pass # it's ok, there's no more-specific request.
except KeyError:
@ -58,7 +62,7 @@ def redirect(request, path="", script=""):
# contains non-ASCII characters. The old scripts didn't support
# non-ASCII characters anyway, so there's no need to handle
# them fully correctly in these redirects.
url += str(rest % request.REQUEST)
url += str(rest % rparam)
url += "/"
except:
# rest had something in it that request didn't have, so just

View file

@ -12,5 +12,5 @@ urlpatterns = patterns('ietf.secr.proceedings.views',
url(r'^(?P<meeting_num>\d{1,3})/recording/$', 'recording', name='proceedings_recording'),
url(r'^(?P<meeting_num>\d{1,3})/recording/edit/(?P<name>[A-Za-z0-9_\-\+]+)$', 'recording_edit', name='proceedings_recording_edit'),
url(r'^(?P<num>\d{1,3}|interim-\d{4}-[A-Za-z0-9_\-\+]+)/%(acronym)s/$' % settings.URL_REGEXPS,
OldUploadRedirect.as_view()),
OldUploadRedirect.as_view(permanent=True)),
)

View file

@ -3,7 +3,6 @@
{% if debug %}
{% if sql_debug %}
{% load debug_filters %}
{% load future %}
<div id="debug">
<hr>

View file

@ -2,7 +2,7 @@
{# Copyright The IETF Trust 2015, All Rights Reserved #}
{% load origin %}
{% load ietf_filters %}
{% load future staticfiles %}
{% load staticfiles %}
{% block pagehead %}
<link rel="stylesheet" href="{% static "jquery.tablesorter/css/theme.bootstrap.min.css" %}">

View file

@ -2,7 +2,7 @@
{# Copyright The IETF Trust 2015, All Rights Reserved #}
{% load origin %}
{% load ietf_filters %}
{% load future staticfiles %}
{% load staticfiles %}
{% block title %}History for {{ doc.name }}-{{ doc.rev }}{% endblock %}

View file

@ -2,7 +2,7 @@
{# Copyright The IETF Trust 2015, All Rights Reserved #}
{% load origin %}
{% load ietf_filters %}
{% load future staticfiles %}
{% load staticfiles %}
{% block pagehead %}
<link rel="stylesheet" href="{% static "jquery.tablesorter/css/theme.bootstrap.min.css" %}">

View file

@ -2,7 +2,7 @@
{# Copyright The IETF Trust 2015, All Rights Reserved #}
{% load origin %}
{% load ietf_filters %}
{% load future staticfiles %}
{% load staticfiles %}
{% block pagehead %}
<link rel="stylesheet" href="{% static "jquery.tablesorter/css/theme.bootstrap.min.css" %}">

View file

@ -1,4 +1,4 @@
{% autoescape off %}{% load ietf_filters %}{% load ipr_filters %}{% load future %}IPR Title: {{ ipr.title|safe }}
{% autoescape off %}{% load ietf_filters %}{% load ipr_filters %}IPR Title: {{ ipr.title|safe }}
Section {% cycle 'I','II','III','IV','V','VI','VII','VIII' as section %}. {% if ipr|to_class_name == "ThirdPartyIprDisclosure" %}Possible {% endif %}Patent Holder/Applicant ("Patent Holder")
Legal Name: {{ ipr.holder_legal_name|safe }}

View file

@ -3,7 +3,6 @@
{% load origin %}
{% load staticfiles %}
{% load ietf_filters ipr_filters bootstrap3 widget_tweaks %}
{% load future %}
{% block title %}{% if form.instance %}Edit IPR #{{ form.instance.id }}{% else %}New IPR{% endif %}{% endblock %}

View file

@ -3,7 +3,6 @@
{% load origin %}
{% load ietf_filters ipr_filters staticfiles %}
{% load future %}
{% block morecss %}
<link rel="stylesheet" href="{% static "jquery.tablesorter/css/theme.bootstrap.min.css" %}">

View file

@ -3,7 +3,6 @@
{% load origin %}
{% load ietf_filters ipr_filters %}
{% load future %}
{% block title %}IPR Details - {{ ipr.title }}{% endblock %}

View file

@ -3,7 +3,7 @@
{% load origin %}
{% load staticfiles %}
{% load ietf_filters %}
{% load future staticfiles %}
{% load staticfiles %}
{% block pagehead %}
<link rel="stylesheet" href="{% static "jquery.tablesorter/css/theme.bootstrap.min.css" %}">

View file

@ -1,6 +1,5 @@
{% extends "base.html" %}
{% load future %}
{% load ietf_filters staticfiles %}
{% block pagehead %}

View file

@ -1,6 +1,5 @@
{# Copyright The IETF Trust 2007, All Rights Reserved #}
{% load ietf_filters %}
{% load future %}
<table class="table table-condensed table-striped tablesorter">
<thead>

View file

@ -3,7 +3,6 @@
{% load origin %}
{% load staticfiles %}
{% load ietf_filters submit_tags %}
{% load future %}
{% block title %}Submission status of {{ submission.name }}-{{ submission.rev }}{% endblock %}

View file

@ -96,8 +96,12 @@ def safe_create_1(self, verbosity, *args, **kwargs):
module = importlib.import_module(".".join(components[:-1]))
fn = getattr(module, components[-1])
fn()
if verbosity < 2:
warnings.simplefilter("ignore", DeprecationWarning)
warnings.simplefilter("always", DeprecationWarning)
warnings.filterwarnings("ignore", message="Passing callable arguments to queryset is deprecated.", module="django.db.models.sql.query", lineno=1156)
warnings.filterwarnings("ignore", message="`MergeDict` is deprecated, use `dict.update()` instead.", module="django.core.handlers.wsgi", lineno=126)
warnings.filterwarnings("ignore", message="The app_mod argument of get_models is deprecated.", module="django.utils.lru_cache", lineno=101)
warnings.filterwarnings("ignore", message="Report.file_reporters will no longer be available in Coverage.py 4.2", module="coverage.report", lineno=43)
return test_database_name