We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Don't crash on meetingless invokation of week-view.html
```
NoReverseMatch at /meeting/week-view.html

Reverse for 'agenda' with keyword arguments '{'num': None}' not found. 1 pattern(s) tried: ['meeting/(?:(?P<num>\\d+)/)?agenda(?P<utc>-utc)?(?P<ext>\\.html)?/?$']

Request Method:     GET
Request URL:     https://datatracker.ietf.org/meeting/week-view.html?show=irtf&tz=europe%2Flondon
Django Version:     2.2.28
Exception Type:     NoReverseMatch
Exception Value:    

Reverse for 'agenda' with keyword arguments '{'num': None}' not found. 1 pattern(s) tried: ['meeting/(?:(?P<num>\\d+)/)?agenda(?P<utc>-utc)?(?P<ext>\\.html)?/?$']

Exception Location:     /a/www/ietf-datatracker/9.14.0/env/lib64/python3.9/site-packages/django/urls/resolvers.py in _reverse_with_prefix, line 677
```

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `ietf/meeting/urls.py`
Content:
```
1 # Copyright The IETF Trust 2007-2020, All Rights Reserved
2 
3 from django.conf.urls import include
4 from django.views.generic import RedirectView
5 from django.conf import settings
6 
7 from ietf.meeting import views, views_proceedings
8 from ietf.utils.urls import url
9 
10 class AgendaRedirectView(RedirectView):
11     ignore_kwargs = ('owner', 'name')
12     def get_redirect_url(self, *args, **kwargs):
13         for kwarg in self.ignore_kwargs:
14             kwargs.pop(kwarg, None)
15         return super().get_redirect_url(*args, **kwargs)
16 
17 safe_for_all_meeting_types = [
18     url(r'^session/(?P<acronym>[-a-z0-9]+)/?$',  views.session_details),
19     url(r'^session/(?P<session_id>\d+)/drafts$',  views.add_session_drafts),
20     url(r'^session/(?P<session_id>\d+)/bluesheets$', views.upload_session_bluesheets),
21     url(r'^session/(?P<session_id>\d+)/minutes$', views.upload_session_minutes),
22     url(r'^session/(?P<session_id>\d+)/agenda$', views.upload_session_agenda),
23     url(r'^session/(?P<session_id>\d+)/import/minutes$', views.import_session_minutes),
24     url(r'^session/(?P<session_id>\d+)/propose_slides$', views.propose_session_slides),
25     url(r'^session/(?P<session_id>\d+)/slides(?:/%(name)s)?$' % settings.URL_REGEXPS, views.upload_session_slides),
26     url(r'^session/(?P<session_id>\d+)/add_to_session$', views.ajax_add_slides_to_session),
27     url(r'^session/(?P<session_id>\d+)/remove_from_session$', views.ajax_remove_slides_from_session),
28     url(r'^session/(?P<session_id>\d+)/reorder_in_session$', views.ajax_reorder_slides_in_session),
29     url(r'^session/(?P<session_id>\d+)/doc/%(name)s/remove$' % settings.URL_REGEXPS, views.remove_sessionpresentation),
30     url(r'^session/(?P<session_id>\d+)\.ics$',    views.agenda_ical),
31     url(r'^sessions/(?P<acronym>[-a-z0-9]+)\.ics$', views.agenda_ical),
32     url(r'^slidesubmission/(?P<slidesubmission_id>\d+)$', views.approve_proposed_slides)
33 ]
34 
35 
36 type_ietf_only_patterns = [
37     url(r'^agenda/%(owner)s/%(schedule_name)s/edit/?$' % settings.URL_REGEXPS, views.edit_meeting_schedule),
38     url(r'^agenda/%(owner)s/%(schedule_name)s/timeslots/$' % settings.URL_REGEXPS, views.edit_meeting_timeslots_and_misc_sessions),
39     url(r'^agenda/%(owner)s/%(schedule_name)s/details$' % settings.URL_REGEXPS, views.edit_schedule_properties),
40     url(r'^agenda/%(owner)s/%(schedule_name)s/delete$' % settings.URL_REGEXPS, views.delete_schedule),
41     url(r'^agenda/%(owner)s/%(schedule_name)s/make_official$' % settings.URL_REGEXPS, views.make_schedule_official),
42     url(r'^agenda/%(owner)s/%(schedule_name)s(\.(?P<ext>.html))?/?$' % settings.URL_REGEXPS, views.agenda),
43     url(r'^agenda/%(owner)s/%(schedule_name)s/week-view(?:.html)?/?$' % settings.URL_REGEXPS, AgendaRedirectView.as_view(pattern_name='agenda', permanent=True)),
44     url(r'^agenda/%(owner)s/%(schedule_name)s/by-room/?$' % settings.URL_REGEXPS, AgendaRedirectView.as_view(pattern_name='agenda', permanent=True)),
45     url(r'^agenda/%(owner)s/%(schedule_name)s/by-type/?$' % settings.URL_REGEXPS, AgendaRedirectView.as_view(pattern_name='agenda', permanent=True)),
46     url(r'^agenda/%(owner)s/%(schedule_name)s/by-type/(?P<type>[a-z]+)$' % settings.URL_REGEXPS, AgendaRedirectView.as_view(pattern_name='agenda', permanent=True)),
47     url(r'^agenda/%(owner)s/%(schedule_name)s/new/$' % settings.URL_REGEXPS, views.new_meeting_schedule),
48     url(r'^agenda/by-type/(?P<type>[a-z]+)/ics$', views.agenda_by_type_ics),
49     url(r'^agenda/personalize', views.agenda, name='agenda-personalize'),
50     url(r'^agendas/list$', views.list_schedules),
51     url(r'^agendas/edit$', RedirectView.as_view(pattern_name='ietf.meeting.views.list_schedules', permanent=True)),
52     url(r'^agendas/diff/$', views.diff_schedules),
53     url(r'^agenda/new/$', views.new_meeting_schedule),
54     url(r'^timeslots/edit/?$',                     views.edit_timeslots),
55     url(r'^timeslot/new$',                       views.create_timeslot),
56     url(r'^timeslot/(?P<slot_id>\d+)/edit$',     views.edit_timeslot),
57     url(r'^timeslot/(?P<slot_id>\d+)/edittype$', views.edit_timeslot_type),
58     url(r'^agenda/(?P<acronym>[-a-z0-9]+)-drafts.pdf$', views.session_draft_pdf),
59     url(r'^agenda/(?P<acronym>[-a-z0-9]+)-drafts.tgz$', views.session_draft_tarfile),
60 ]
61 
62 # This is a limited subset of the list above -- many of the views above won't work for interim meetings
63 type_interim_patterns = [
64     url(r'^agenda/(?P<acronym>[A-Za-z0-9-]+)-drafts.pdf$', views.session_draft_pdf),
65     url(r'^agenda/(?P<acronym>[A-Za-z0-9-]+)-drafts.tgz$', views.session_draft_tarfile),
66     url(r'^materials/%(document)s((?P<ext>\.[a-z0-9]+)|/)?$' % settings.URL_REGEXPS, views.materials_document),
67     url(r'^agenda.json$', views.agenda_json)
68 ]
69 
70 type_ietf_only_patterns_id_optional = [
71     url(r'^agenda(?P<utc>-utc)?(?P<ext>\.html)?/?$', views.agenda, name='agenda'),
72     url(r'^agenda(?P<utc>-utc)?(?P<ext>\.txt|\.csv)$', views.agenda_plain),
73     url(r'^agenda/edit$',
74         RedirectView.as_view(pattern_name='ietf.meeting.views.edit_meeting_schedule', permanent=True),
75         name='ietf.meeting.views.edit_meeting_schedule'),
76     url(r'^agenda/edit/$', views.edit_meeting_schedule),
77     url(r'^requests$', views.meeting_requests),
78     url(r'^agenda/agenda\.ics$', views.agenda_ical),
79     url(r'^agenda\.ics$', views.agenda_ical),
80     url(r'^agenda.json$', views.agenda_json),
81     url(r'^agenda/week-view(?:.html)?/?$', RedirectView.as_view(pattern_name='agenda', permanent=True)),
82     url(r'^floor-plan/?$', views.agenda, name='floor-plan'),
83     url(r'^floor-plan/(?P<floor>[-a-z0-9_]+)/?$', RedirectView.as_view(pattern_name='floor-plan', permanent=True)),
84     url(r'^week-view(?:.html)?/?$', RedirectView.as_view(pattern_name='agenda', permanent=True)),
85     url(r'^materials(?:.html)?/?$', views.materials),
86     url(r'^request_minutes/?$', views.request_minutes),
87     url(r'^materials/%(document)s((?P<ext>\.[a-z0-9]+)|/)?$' % settings.URL_REGEXPS, views.materials_document),
88     url(r'^session/?$', views.materials_editable_groups),
89     url(r'^proceedings(?:.html)?/?$', views.proceedings),
90     url(r'^proceedings(?:.html)?/finalize/?$', views.finalize_proceedings),
91     url(r'^proceedings/acknowledgements/$', views.proceedings_acknowledgements),
92     url(r'^proceedings/attendees/$', views.proceedings_attendees),
93     url(r'^proceedings/overview/$', views.proceedings_overview),
94     url(r'^proceedings/activity-report/$', views.proceedings_activity_report),
95     url(r'^proceedings/materials/$', views_proceedings.material_details),
96     url(r'^proceedings/materials/(?P<material_type>[a-z_]+)/$', views_proceedings.edit_material),
97     url(r'^proceedings/materials/(?P<material_type>[a-z_]+)/new/$', views_proceedings.upload_material),
98     url(r'^proceedings/materials/(?P<material_type>[a-z_]+)/remove/$',
99         views_proceedings.remove_restore_material,
100         {'action': 'remove'},
101         'ietf.meeting.views_proceedings.remove_material'),
102     url(r'^proceedings/materials/(?P<material_type>[a-z_]+)/restore/$',
103         views_proceedings.remove_restore_material,
104         {'action': 'restore'},
105         'ietf.meeting.views_proceedings.restore_material'),
106     url(r'^important-dates/$', views.important_dates),
107     url(r'^important-dates.(?P<output_format>ics)$', views.important_dates),
108     url(r'^proceedings/meetinghosts/edit/', views_proceedings.edit_meetinghosts),
109     url(r'^proceedings/meetinghosts/(?P<host_id>\d+)/logo/$', views_proceedings.meetinghost_logo),
110 ]
111 
112 urlpatterns = [
113     # First patterns which start with unique strings
114     url(r'^$', views.current_materials),
115     url(r'^interim/announce/?$', views.interim_announce),
116     url(r'^interim/announce/(?P<number>[A-Za-z0-9._+-]+)/?$', views.interim_send_announcement),
117     url(r'^interim/skip_announce/(?P<number>[A-Za-z0-9._+-]+)/?$', views.interim_skip_announcement),
118     url(r'^interim/request/?$', views.interim_request),
119     url(r'^interim/request/(?P<number>[A-Za-z0-9._+-]+)/?$', views.interim_request_details),
120     url(r'^interim/request/(?P<number>[A-Za-z0-9._+-]+)/edit/?$', views.interim_request_edit),
121     url(r'^interim/request/(?P<number>[A-Za-z0-9._+-]+)/cancel/?$', views.interim_request_cancel),
122     url(r'^interim/session/(?P<sessionid>[A-Za-z0-9._+-]+)/cancel/?$', views.interim_request_session_cancel),
123     url(r'^interim/pending/?$', views.interim_pending),
124     url(r'^requests.html$', RedirectView.as_view(url='/meeting/requests', permanent=True)),
125     url(r'^past/?$', views.past),
126     url(r'^upcoming/?$', views.upcoming),
127     url(r'^upcoming\.ics/?$', views.upcoming_ical),
128     url(r'^upcoming\.json/?$', views.upcoming_json),
129     url(r'^session/(?P<session_id>\d+)/agenda_materials$', views.session_materials),
130     url(r'^session/(?P<session_id>\d+)/cancel/?', views.cancel_session),
131     url(r'^session/(?P<session_id>\d+)/edit/?', views.edit_session),
132     # Then patterns from more specific to less
133     url(r'^(?P<num>interim-[a-z0-9-]+)/', include(type_interim_patterns)),
134     url(r'^(?P<num>\d+)/requests.html$', RedirectView.as_view(url='/meeting/%(num)s/requests', permanent=True)),
135     # The optionals have to go first of these two, otherwise the agenda/(owner)/(name)/ patterns match things they shouldn't
136     url(r'^(?:(?P<num>\d+)/)?', include(type_ietf_only_patterns_id_optional)),
137     url(r'^(?P<num>\d+)/', include(type_ietf_only_patterns)),
138     #
139     url(r'^(?P<num>\d+)/', include(safe_for_all_meeting_types)),
140     url(r'^(?P<num>interim-[a-z0-9-]+)/', include(safe_for_all_meeting_types)),
141 ]
142 
143
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/ietf/meeting/urls.py b/ietf/meeting/urls.py
--- a/ietf/meeting/urls.py
+++ b/ietf/meeting/urls.py
@@ -10,8 +10,7 @@
 class AgendaRedirectView(RedirectView):
     ignore_kwargs = ('owner', 'name')
     def get_redirect_url(self, *args, **kwargs):
-        for kwarg in self.ignore_kwargs:
-            kwargs.pop(kwarg, None)
+        kwargs = {k: v for k, v in kwargs.items() if v is not None and k not in self.ignore_kwargs}
         return super().get_redirect_url(*args, **kwargs)
 
 safe_for_all_meeting_types = [
@@ -78,10 +77,10 @@
     url(r'^agenda/agenda\.ics$', views.agenda_ical),
     url(r'^agenda\.ics$', views.agenda_ical),
     url(r'^agenda.json$', views.agenda_json),
-    url(r'^agenda/week-view(?:.html)?/?$', RedirectView.as_view(pattern_name='agenda', permanent=True)),
+    url(r'^agenda/week-view(?:.html)?/?$', AgendaRedirectView.as_view(pattern_name='agenda', permanent=True)),
     url(r'^floor-plan/?$', views.agenda, name='floor-plan'),
     url(r'^floor-plan/(?P<floor>[-a-z0-9_]+)/?$', RedirectView.as_view(pattern_name='floor-plan', permanent=True)),
-    url(r'^week-view(?:.html)?/?$', RedirectView.as_view(pattern_name='agenda', permanent=True)),
+    url(r'^week-view(?:.html)?/?$', AgendaRedirectView.as_view(pattern_name='agenda', permanent=True)),
     url(r'^materials(?:.html)?/?$', views.materials),
     url(r'^request_minutes/?$', views.request_minutes),
     url(r'^materials/%(document)s((?P<ext>\.[a-z0-9]+)|/)?$' % settings.URL_REGEXPS, views.materials_document),

{"golden_diff": "diff --git a/ietf/meeting/urls.py b/ietf/meeting/urls.py\n--- a/ietf/meeting/urls.py\n+++ b/ietf/meeting/urls.py\n@@ -10,8 +10,7 @@\n class AgendaRedirectView(RedirectView):\n     ignore_kwargs = ('owner', 'name')\n     def get_redirect_url(self, *args, **kwargs):\n-        for kwarg in self.ignore_kwargs:\n-            kwargs.pop(kwarg, None)\n+        kwargs = {k: v for k, v in kwargs.items() if v is not None and k not in self.ignore_kwargs}\n         return super().get_redirect_url(*args, **kwargs)\n \n safe_for_all_meeting_types = [\n@@ -78,10 +77,10 @@\n     url(r'^agenda/agenda\\.ics$', views.agenda_ical),\n     url(r'^agenda\\.ics$', views.agenda_ical),\n     url(r'^agenda.json$', views.agenda_json),\n-    url(r'^agenda/week-view(?:.html)?/?$', RedirectView.as_view(pattern_name='agenda', permanent=True)),\n+    url(r'^agenda/week-view(?:.html)?/?$', AgendaRedirectView.as_view(pattern_name='agenda', permanent=True)),\n     url(r'^floor-plan/?$', views.agenda, name='floor-plan'),\n     url(r'^floor-plan/(?P<floor>[-a-z0-9_]+)/?$', RedirectView.as_view(pattern_name='floor-plan', permanent=True)),\n-    url(r'^week-view(?:.html)?/?$', RedirectView.as_view(pattern_name='agenda', permanent=True)),\n+    url(r'^week-view(?:.html)?/?$', AgendaRedirectView.as_view(pattern_name='agenda', permanent=True)),\n     url(r'^materials(?:.html)?/?$', views.materials),\n     url(r'^request_minutes/?$', views.request_minutes),\n     url(r'^materials/%(document)s((?P<ext>\\.[a-z0-9]+)|/)?$' % settings.URL_REGEXPS, views.materials_document),\n", "issue": "Don't crash on meetingless invokation of week-view.html\n```\r\nNoReverseMatch at /meeting/week-view.html\r\n\r\nReverse for 'agenda' with keyword arguments '{'num': None}' not found. 1 pattern(s) tried: ['meeting/(?:(?P<num>\\\\d+)/)?agenda(?P<utc>-utc)?(?P<ext>\\\\.html)?/?$']\r\n\r\nRequest Method:     GET\r\nRequest URL:     https://datatracker.ietf.org/meeting/week-view.html?show=irtf&tz=europe%2Flondon\r\nDjango Version:     2.2.28\r\nException Type:     NoReverseMatch\r\nException Value:    \r\n\r\nReverse for 'agenda' with keyword arguments '{'num': None}' not found. 1 pattern(s) tried: ['meeting/(?:(?P<num>\\\\d+)/)?agenda(?P<utc>-utc)?(?P<ext>\\\\.html)?/?$']\r\n\r\nException Location:     /a/www/ietf-datatracker/9.14.0/env/lib64/python3.9/site-packages/django/urls/resolvers.py in _reverse_with_prefix, line 677\r\n```\n", "before_files": [{"content": "# Copyright The IETF Trust 2007-2020, All Rights Reserved\n\nfrom django.conf.urls import include\nfrom django.views.generic import RedirectView\nfrom django.conf import settings\n\nfrom ietf.meeting import views, views_proceedings\nfrom ietf.utils.urls import url\n\nclass AgendaRedirectView(RedirectView):\n    ignore_kwargs = ('owner', 'name')\n    def get_redirect_url(self, *args, **kwargs):\n        for kwarg in self.ignore_kwargs:\n            kwargs.pop(kwarg, None)\n        return super().get_redirect_url(*args, **kwargs)\n\nsafe_for_all_meeting_types = [\n    url(r'^session/(?P<acronym>[-a-z0-9]+)/?$',  views.session_details),\n    url(r'^session/(?P<session_id>\\d+)/drafts$',  views.add_session_drafts),\n    url(r'^session/(?P<session_id>\\d+)/bluesheets$', views.upload_session_bluesheets),\n    url(r'^session/(?P<session_id>\\d+)/minutes$', views.upload_session_minutes),\n    url(r'^session/(?P<session_id>\\d+)/agenda$', views.upload_session_agenda),\n    url(r'^session/(?P<session_id>\\d+)/import/minutes$', views.import_session_minutes),\n    url(r'^session/(?P<session_id>\\d+)/propose_slides$', views.propose_session_slides),\n    url(r'^session/(?P<session_id>\\d+)/slides(?:/%(name)s)?$' % settings.URL_REGEXPS, views.upload_session_slides),\n    url(r'^session/(?P<session_id>\\d+)/add_to_session$', views.ajax_add_slides_to_session),\n    url(r'^session/(?P<session_id>\\d+)/remove_from_session$', views.ajax_remove_slides_from_session),\n    url(r'^session/(?P<session_id>\\d+)/reorder_in_session$', views.ajax_reorder_slides_in_session),\n    url(r'^session/(?P<session_id>\\d+)/doc/%(name)s/remove$' % settings.URL_REGEXPS, views.remove_sessionpresentation),\n    url(r'^session/(?P<session_id>\\d+)\\.ics$',    views.agenda_ical),\n    url(r'^sessions/(?P<acronym>[-a-z0-9]+)\\.ics$', views.agenda_ical),\n    url(r'^slidesubmission/(?P<slidesubmission_id>\\d+)$', views.approve_proposed_slides)\n]\n\n\ntype_ietf_only_patterns = [\n    url(r'^agenda/%(owner)s/%(schedule_name)s/edit/?$' % settings.URL_REGEXPS, views.edit_meeting_schedule),\n    url(r'^agenda/%(owner)s/%(schedule_name)s/timeslots/$' % settings.URL_REGEXPS, views.edit_meeting_timeslots_and_misc_sessions),\n    url(r'^agenda/%(owner)s/%(schedule_name)s/details$' % settings.URL_REGEXPS, views.edit_schedule_properties),\n    url(r'^agenda/%(owner)s/%(schedule_name)s/delete$' % settings.URL_REGEXPS, views.delete_schedule),\n    url(r'^agenda/%(owner)s/%(schedule_name)s/make_official$' % settings.URL_REGEXPS, views.make_schedule_official),\n    url(r'^agenda/%(owner)s/%(schedule_name)s(\\.(?P<ext>.html))?/?$' % settings.URL_REGEXPS, views.agenda),\n    url(r'^agenda/%(owner)s/%(schedule_name)s/week-view(?:.html)?/?$' % settings.URL_REGEXPS, AgendaRedirectView.as_view(pattern_name='agenda', permanent=True)),\n    url(r'^agenda/%(owner)s/%(schedule_name)s/by-room/?$' % settings.URL_REGEXPS, AgendaRedirectView.as_view(pattern_name='agenda', permanent=True)),\n    url(r'^agenda/%(owner)s/%(schedule_name)s/by-type/?$' % settings.URL_REGEXPS, AgendaRedirectView.as_view(pattern_name='agenda', permanent=True)),\n    url(r'^agenda/%(owner)s/%(schedule_name)s/by-type/(?P<type>[a-z]+)$' % settings.URL_REGEXPS, AgendaRedirectView.as_view(pattern_name='agenda', permanent=True)),\n    url(r'^agenda/%(owner)s/%(schedule_name)s/new/$' % settings.URL_REGEXPS, views.new_meeting_schedule),\n    url(r'^agenda/by-type/(?P<type>[a-z]+)/ics$', views.agenda_by_type_ics),\n    url(r'^agenda/personalize', views.agenda, name='agenda-personalize'),\n    url(r'^agendas/list$', views.list_schedules),\n    url(r'^agendas/edit$', RedirectView.as_view(pattern_name='ietf.meeting.views.list_schedules', permanent=True)),\n    url(r'^agendas/diff/$', views.diff_schedules),\n    url(r'^agenda/new/$', views.new_meeting_schedule),\n    url(r'^timeslots/edit/?$',                     views.edit_timeslots),\n    url(r'^timeslot/new$',                       views.create_timeslot),\n    url(r'^timeslot/(?P<slot_id>\\d+)/edit$',     views.edit_timeslot),\n    url(r'^timeslot/(?P<slot_id>\\d+)/edittype$', views.edit_timeslot_type),\n    url(r'^agenda/(?P<acronym>[-a-z0-9]+)-drafts.pdf$', views.session_draft_pdf),\n    url(r'^agenda/(?P<acronym>[-a-z0-9]+)-drafts.tgz$', views.session_draft_tarfile),\n]\n\n# This is a limited subset of the list above -- many of the views above won't work for interim meetings\ntype_interim_patterns = [\n    url(r'^agenda/(?P<acronym>[A-Za-z0-9-]+)-drafts.pdf$', views.session_draft_pdf),\n    url(r'^agenda/(?P<acronym>[A-Za-z0-9-]+)-drafts.tgz$', views.session_draft_tarfile),\n    url(r'^materials/%(document)s((?P<ext>\\.[a-z0-9]+)|/)?$' % settings.URL_REGEXPS, views.materials_document),\n    url(r'^agenda.json$', views.agenda_json)\n]\n\ntype_ietf_only_patterns_id_optional = [\n    url(r'^agenda(?P<utc>-utc)?(?P<ext>\\.html)?/?$', views.agenda, name='agenda'),\n    url(r'^agenda(?P<utc>-utc)?(?P<ext>\\.txt|\\.csv)$', views.agenda_plain),\n    url(r'^agenda/edit$',\n        RedirectView.as_view(pattern_name='ietf.meeting.views.edit_meeting_schedule', permanent=True),\n        name='ietf.meeting.views.edit_meeting_schedule'),\n    url(r'^agenda/edit/$', views.edit_meeting_schedule),\n    url(r'^requests$', views.meeting_requests),\n    url(r'^agenda/agenda\\.ics$', views.agenda_ical),\n    url(r'^agenda\\.ics$', views.agenda_ical),\n    url(r'^agenda.json$', views.agenda_json),\n    url(r'^agenda/week-view(?:.html)?/?$', RedirectView.as_view(pattern_name='agenda', permanent=True)),\n    url(r'^floor-plan/?$', views.agenda, name='floor-plan'),\n    url(r'^floor-plan/(?P<floor>[-a-z0-9_]+)/?$', RedirectView.as_view(pattern_name='floor-plan', permanent=True)),\n    url(r'^week-view(?:.html)?/?$', RedirectView.as_view(pattern_name='agenda', permanent=True)),\n    url(r'^materials(?:.html)?/?$', views.materials),\n    url(r'^request_minutes/?$', views.request_minutes),\n    url(r'^materials/%(document)s((?P<ext>\\.[a-z0-9]+)|/)?$' % settings.URL_REGEXPS, views.materials_document),\n    url(r'^session/?$', views.materials_editable_groups),\n    url(r'^proceedings(?:.html)?/?$', views.proceedings),\n    url(r'^proceedings(?:.html)?/finalize/?$', views.finalize_proceedings),\n    url(r'^proceedings/acknowledgements/$', views.proceedings_acknowledgements),\n    url(r'^proceedings/attendees/$', views.proceedings_attendees),\n    url(r'^proceedings/overview/$', views.proceedings_overview),\n    url(r'^proceedings/activity-report/$', views.proceedings_activity_report),\n    url(r'^proceedings/materials/$', views_proceedings.material_details),\n    url(r'^proceedings/materials/(?P<material_type>[a-z_]+)/$', views_proceedings.edit_material),\n    url(r'^proceedings/materials/(?P<material_type>[a-z_]+)/new/$', views_proceedings.upload_material),\n    url(r'^proceedings/materials/(?P<material_type>[a-z_]+)/remove/$',\n        views_proceedings.remove_restore_material,\n        {'action': 'remove'},\n        'ietf.meeting.views_proceedings.remove_material'),\n    url(r'^proceedings/materials/(?P<material_type>[a-z_]+)/restore/$',\n        views_proceedings.remove_restore_material,\n        {'action': 'restore'},\n        'ietf.meeting.views_proceedings.restore_material'),\n    url(r'^important-dates/$', views.important_dates),\n    url(r'^important-dates.(?P<output_format>ics)$', views.important_dates),\n    url(r'^proceedings/meetinghosts/edit/', views_proceedings.edit_meetinghosts),\n    url(r'^proceedings/meetinghosts/(?P<host_id>\\d+)/logo/$', views_proceedings.meetinghost_logo),\n]\n\nurlpatterns = [\n    # First patterns which start with unique strings\n    url(r'^$', views.current_materials),\n    url(r'^interim/announce/?$', views.interim_announce),\n    url(r'^interim/announce/(?P<number>[A-Za-z0-9._+-]+)/?$', views.interim_send_announcement),\n    url(r'^interim/skip_announce/(?P<number>[A-Za-z0-9._+-]+)/?$', views.interim_skip_announcement),\n    url(r'^interim/request/?$', views.interim_request),\n    url(r'^interim/request/(?P<number>[A-Za-z0-9._+-]+)/?$', views.interim_request_details),\n    url(r'^interim/request/(?P<number>[A-Za-z0-9._+-]+)/edit/?$', views.interim_request_edit),\n    url(r'^interim/request/(?P<number>[A-Za-z0-9._+-]+)/cancel/?$', views.interim_request_cancel),\n    url(r'^interim/session/(?P<sessionid>[A-Za-z0-9._+-]+)/cancel/?$', views.interim_request_session_cancel),\n    url(r'^interim/pending/?$', views.interim_pending),\n    url(r'^requests.html$', RedirectView.as_view(url='/meeting/requests', permanent=True)),\n    url(r'^past/?$', views.past),\n    url(r'^upcoming/?$', views.upcoming),\n    url(r'^upcoming\\.ics/?$', views.upcoming_ical),\n    url(r'^upcoming\\.json/?$', views.upcoming_json),\n    url(r'^session/(?P<session_id>\\d+)/agenda_materials$', views.session_materials),\n    url(r'^session/(?P<session_id>\\d+)/cancel/?', views.cancel_session),\n    url(r'^session/(?P<session_id>\\d+)/edit/?', views.edit_session),\n    # Then patterns from more specific to less\n    url(r'^(?P<num>interim-[a-z0-9-]+)/', include(type_interim_patterns)),\n    url(r'^(?P<num>\\d+)/requests.html$', RedirectView.as_view(url='/meeting/%(num)s/requests', permanent=True)),\n    # The optionals have to go first of these two, otherwise the agenda/(owner)/(name)/ patterns match things they shouldn't\n    url(r'^(?:(?P<num>\\d+)/)?', include(type_ietf_only_patterns_id_optional)),\n    url(r'^(?P<num>\\d+)/', include(type_ietf_only_patterns)),\n    #\n    url(r'^(?P<num>\\d+)/', include(safe_for_all_meeting_types)),\n    url(r'^(?P<num>interim-[a-z0-9-]+)/', include(safe_for_all_meeting_types)),\n]\n\n", "path": "ietf/meeting/urls.py"}], "after_files": [{"content": "# Copyright The IETF Trust 2007-2020, All Rights Reserved\n\nfrom django.conf.urls import include\nfrom django.views.generic import RedirectView\nfrom django.conf import settings\n\nfrom ietf.meeting import views, views_proceedings\nfrom ietf.utils.urls import url\n\nclass AgendaRedirectView(RedirectView):\n    ignore_kwargs = ('owner', 'name')\n    def get_redirect_url(self, *args, **kwargs):\n        kwargs = {k: v for k, v in kwargs.items() if v is not None and k not in self.ignore_kwargs}\n        return super().get_redirect_url(*args, **kwargs)\n\nsafe_for_all_meeting_types = [\n    url(r'^session/(?P<acronym>[-a-z0-9]+)/?$',  views.session_details),\n    url(r'^session/(?P<session_id>\\d+)/drafts$',  views.add_session_drafts),\n    url(r'^session/(?P<session_id>\\d+)/bluesheets$', views.upload_session_bluesheets),\n    url(r'^session/(?P<session_id>\\d+)/minutes$', views.upload_session_minutes),\n    url(r'^session/(?P<session_id>\\d+)/agenda$', views.upload_session_agenda),\n    url(r'^session/(?P<session_id>\\d+)/import/minutes$', views.import_session_minutes),\n    url(r'^session/(?P<session_id>\\d+)/propose_slides$', views.propose_session_slides),\n    url(r'^session/(?P<session_id>\\d+)/slides(?:/%(name)s)?$' % settings.URL_REGEXPS, views.upload_session_slides),\n    url(r'^session/(?P<session_id>\\d+)/add_to_session$', views.ajax_add_slides_to_session),\n    url(r'^session/(?P<session_id>\\d+)/remove_from_session$', views.ajax_remove_slides_from_session),\n    url(r'^session/(?P<session_id>\\d+)/reorder_in_session$', views.ajax_reorder_slides_in_session),\n    url(r'^session/(?P<session_id>\\d+)/doc/%(name)s/remove$' % settings.URL_REGEXPS, views.remove_sessionpresentation),\n    url(r'^session/(?P<session_id>\\d+)\\.ics$',    views.agenda_ical),\n    url(r'^sessions/(?P<acronym>[-a-z0-9]+)\\.ics$', views.agenda_ical),\n    url(r'^slidesubmission/(?P<slidesubmission_id>\\d+)$', views.approve_proposed_slides)\n]\n\n\ntype_ietf_only_patterns = [\n    url(r'^agenda/%(owner)s/%(schedule_name)s/edit/?$' % settings.URL_REGEXPS, views.edit_meeting_schedule),\n    url(r'^agenda/%(owner)s/%(schedule_name)s/timeslots/$' % settings.URL_REGEXPS, views.edit_meeting_timeslots_and_misc_sessions),\n    url(r'^agenda/%(owner)s/%(schedule_name)s/details$' % settings.URL_REGEXPS, views.edit_schedule_properties),\n    url(r'^agenda/%(owner)s/%(schedule_name)s/delete$' % settings.URL_REGEXPS, views.delete_schedule),\n    url(r'^agenda/%(owner)s/%(schedule_name)s/make_official$' % settings.URL_REGEXPS, views.make_schedule_official),\n    url(r'^agenda/%(owner)s/%(schedule_name)s(\\.(?P<ext>.html))?/?$' % settings.URL_REGEXPS, views.agenda),\n    url(r'^agenda/%(owner)s/%(schedule_name)s/week-view(?:.html)?/?$' % settings.URL_REGEXPS, AgendaRedirectView.as_view(pattern_name='agenda', permanent=True)),\n    url(r'^agenda/%(owner)s/%(schedule_name)s/by-room/?$' % settings.URL_REGEXPS, AgendaRedirectView.as_view(pattern_name='agenda', permanent=True)),\n    url(r'^agenda/%(owner)s/%(schedule_name)s/by-type/?$' % settings.URL_REGEXPS, AgendaRedirectView.as_view(pattern_name='agenda', permanent=True)),\n    url(r'^agenda/%(owner)s/%(schedule_name)s/by-type/(?P<type>[a-z]+)$' % settings.URL_REGEXPS, AgendaRedirectView.as_view(pattern_name='agenda', permanent=True)),\n    url(r'^agenda/%(owner)s/%(schedule_name)s/new/$' % settings.URL_REGEXPS, views.new_meeting_schedule),\n    url(r'^agenda/by-type/(?P<type>[a-z]+)/ics$', views.agenda_by_type_ics),\n    url(r'^agenda/personalize', views.agenda, name='agenda-personalize'),\n    url(r'^agendas/list$', views.list_schedules),\n    url(r'^agendas/edit$', RedirectView.as_view(pattern_name='ietf.meeting.views.list_schedules', permanent=True)),\n    url(r'^agendas/diff/$', views.diff_schedules),\n    url(r'^agenda/new/$', views.new_meeting_schedule),\n    url(r'^timeslots/edit/?$',                     views.edit_timeslots),\n    url(r'^timeslot/new$',                       views.create_timeslot),\n    url(r'^timeslot/(?P<slot_id>\\d+)/edit$',     views.edit_timeslot),\n    url(r'^timeslot/(?P<slot_id>\\d+)/edittype$', views.edit_timeslot_type),\n    url(r'^agenda/(?P<acronym>[-a-z0-9]+)-drafts.pdf$', views.session_draft_pdf),\n    url(r'^agenda/(?P<acronym>[-a-z0-9]+)-drafts.tgz$', views.session_draft_tarfile),\n]\n\n# This is a limited subset of the list above -- many of the views above won't work for interim meetings\ntype_interim_patterns = [\n    url(r'^agenda/(?P<acronym>[A-Za-z0-9-]+)-drafts.pdf$', views.session_draft_pdf),\n    url(r'^agenda/(?P<acronym>[A-Za-z0-9-]+)-drafts.tgz$', views.session_draft_tarfile),\n    url(r'^materials/%(document)s((?P<ext>\\.[a-z0-9]+)|/)?$' % settings.URL_REGEXPS, views.materials_document),\n    url(r'^agenda.json$', views.agenda_json)\n]\n\ntype_ietf_only_patterns_id_optional = [\n    url(r'^agenda(?P<utc>-utc)?(?P<ext>\\.html)?/?$', views.agenda, name='agenda'),\n    url(r'^agenda(?P<utc>-utc)?(?P<ext>\\.txt|\\.csv)$', views.agenda_plain),\n    url(r'^agenda/edit$',\n        RedirectView.as_view(pattern_name='ietf.meeting.views.edit_meeting_schedule', permanent=True),\n        name='ietf.meeting.views.edit_meeting_schedule'),\n    url(r'^agenda/edit/$', views.edit_meeting_schedule),\n    url(r'^requests$', views.meeting_requests),\n    url(r'^agenda/agenda\\.ics$', views.agenda_ical),\n    url(r'^agenda\\.ics$', views.agenda_ical),\n    url(r'^agenda.json$', views.agenda_json),\n    url(r'^agenda/week-view(?:.html)?/?$', AgendaRedirectView.as_view(pattern_name='agenda', permanent=True)),\n    url(r'^floor-plan/?$', views.agenda, name='floor-plan'),\n    url(r'^floor-plan/(?P<floor>[-a-z0-9_]+)/?$', RedirectView.as_view(pattern_name='floor-plan', permanent=True)),\n    url(r'^week-view(?:.html)?/?$', AgendaRedirectView.as_view(pattern_name='agenda', permanent=True)),\n    url(r'^materials(?:.html)?/?$', views.materials),\n    url(r'^request_minutes/?$', views.request_minutes),\n    url(r'^materials/%(document)s((?P<ext>\\.[a-z0-9]+)|/)?$' % settings.URL_REGEXPS, views.materials_document),\n    url(r'^session/?$', views.materials_editable_groups),\n    url(r'^proceedings(?:.html)?/?$', views.proceedings),\n    url(r'^proceedings(?:.html)?/finalize/?$', views.finalize_proceedings),\n    url(r'^proceedings/acknowledgements/$', views.proceedings_acknowledgements),\n    url(r'^proceedings/attendees/$', views.proceedings_attendees),\n    url(r'^proceedings/overview/$', views.proceedings_overview),\n    url(r'^proceedings/activity-report/$', views.proceedings_activity_report),\n    url(r'^proceedings/materials/$', views_proceedings.material_details),\n    url(r'^proceedings/materials/(?P<material_type>[a-z_]+)/$', views_proceedings.edit_material),\n    url(r'^proceedings/materials/(?P<material_type>[a-z_]+)/new/$', views_proceedings.upload_material),\n    url(r'^proceedings/materials/(?P<material_type>[a-z_]+)/remove/$',\n        views_proceedings.remove_restore_material,\n        {'action': 'remove'},\n        'ietf.meeting.views_proceedings.remove_material'),\n    url(r'^proceedings/materials/(?P<material_type>[a-z_]+)/restore/$',\n        views_proceedings.remove_restore_material,\n        {'action': 'restore'},\n        'ietf.meeting.views_proceedings.restore_material'),\n    url(r'^important-dates/$', views.important_dates),\n    url(r'^important-dates.(?P<output_format>ics)$', views.important_dates),\n    url(r'^proceedings/meetinghosts/edit/', views_proceedings.edit_meetinghosts),\n    url(r'^proceedings/meetinghosts/(?P<host_id>\\d+)/logo/$', views_proceedings.meetinghost_logo),\n]\n\nurlpatterns = [\n    # First patterns which start with unique strings\n    url(r'^$', views.current_materials),\n    url(r'^interim/announce/?$', views.interim_announce),\n    url(r'^interim/announce/(?P<number>[A-Za-z0-9._+-]+)/?$', views.interim_send_announcement),\n    url(r'^interim/skip_announce/(?P<number>[A-Za-z0-9._+-]+)/?$', views.interim_skip_announcement),\n    url(r'^interim/request/?$', views.interim_request),\n    url(r'^interim/request/(?P<number>[A-Za-z0-9._+-]+)/?$', views.interim_request_details),\n    url(r'^interim/request/(?P<number>[A-Za-z0-9._+-]+)/edit/?$', views.interim_request_edit),\n    url(r'^interim/request/(?P<number>[A-Za-z0-9._+-]+)/cancel/?$', views.interim_request_cancel),\n    url(r'^interim/session/(?P<sessionid>[A-Za-z0-9._+-]+)/cancel/?$', views.interim_request_session_cancel),\n    url(r'^interim/pending/?$', views.interim_pending),\n    url(r'^requests.html$', RedirectView.as_view(url='/meeting/requests', permanent=True)),\n    url(r'^past/?$', views.past),\n    url(r'^upcoming/?$', views.upcoming),\n    url(r'^upcoming\\.ics/?$', views.upcoming_ical),\n    url(r'^upcoming\\.json/?$', views.upcoming_json),\n    url(r'^session/(?P<session_id>\\d+)/agenda_materials$', views.session_materials),\n    url(r'^session/(?P<session_id>\\d+)/cancel/?', views.cancel_session),\n    url(r'^session/(?P<session_id>\\d+)/edit/?', views.edit_session),\n    # Then patterns from more specific to less\n    url(r'^(?P<num>interim-[a-z0-9-]+)/', include(type_interim_patterns)),\n    url(r'^(?P<num>\\d+)/requests.html$', RedirectView.as_view(url='/meeting/%(num)s/requests', permanent=True)),\n    # The optionals have to go first of these two, otherwise the agenda/(owner)/(name)/ patterns match things they shouldn't\n    url(r'^(?:(?P<num>\\d+)/)?', include(type_ietf_only_patterns_id_optional)),\n    url(r'^(?P<num>\\d+)/', include(type_ietf_only_patterns)),\n    #\n    url(r'^(?P<num>\\d+)/', include(safe_for_all_meeting_types)),\n    url(r'^(?P<num>interim-[a-z0-9-]+)/', include(safe_for_all_meeting_types)),\n]\n\n", "path": "ietf/meeting/urls.py"}]}