Skip to content

Commit d4967c6

Browse files
committed
Eliminated a few url() name= parameters.
- Legacy-Id: 12834
1 parent dd7b3eb commit d4967c6

8 files changed

Lines changed: 19 additions & 19 deletions

File tree

ietf/secr/areas/tests.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class SecrAreasTestCase(TestCase):
1919
def test_main(self):
2020
"Main Test"
2121
make_test_data()
22-
url = reverse('areas')
22+
url = reverse('ietf.secr.areas.views.list_areas')
2323
self.client.login(username="secretary", password="secretary+password")
2424
response = self.client.get(url)
2525
self.assertEqual(response.status_code, 200)
@@ -29,7 +29,7 @@ def test_view(self):
2929
make_test_data()
3030
augment_data()
3131
areas = Group.objects.filter(type='area',state='active')
32-
url = reverse('areas_view', kwargs={'name':areas[0].acronym})
32+
url = reverse('ietf.secr.areas.views.view', kwargs={'name':areas[0].acronym})
3333
self.client.login(username="secretary", password="secretary+password")
3434
response = self.client.get(url)
3535
self.assertEqual(response.status_code, 200)

ietf/secr/areas/urls.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33
from ietf.utils.urls import url
44

55
urlpatterns = [
6-
url(r'^$', views.list_areas, name='areas'),
7-
url(r'^add/$', views.add, name='areas_add'),
8-
url(r'^getemails', views.getemails, name='areas_emails'),
9-
url(r'^getpeople', views.getpeople, name='areas_getpeople'),
10-
url(r'^(?P<name>[A-Za-z0-9.-]+)/$', views.view, name='areas_view'),
11-
url(r'^(?P<name>[A-Za-z0-9.-]+)/edit/$', views.edit, name='areas_edit'),
12-
url(r'^(?P<name>[A-Za-z0-9.-]+)/people/$', views.people, name='areas_people'),
13-
url(r'^(?P<name>[A-Za-z0-9.-]+)/people/modify/$', views.modify, name='areas_modify'),
6+
url(r'^$', views.list_areas),
7+
url(r'^add/$', views.add),
8+
url(r'^getemails', views.getemails),
9+
url(r'^getpeople', views.getpeople),
10+
url(r'^(?P<name>[A-Za-z0-9.-]+)/$', views.view),
11+
url(r'^(?P<name>[A-Za-z0-9.-]+)/edit/$', views.edit),
12+
url(r'^(?P<name>[A-Za-z0-9.-]+)/people/$', views.people),
13+
url(r'^(?P<name>[A-Za-z0-9.-]+)/people/modify/$', views.modify),
1414
]

ietf/secr/areas/views.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -144,9 +144,9 @@ def edit(request, name):
144144
time=new_area.time)
145145

146146
messages.success(request, 'The Area entry was changed successfully')
147-
return redirect('areas_view', name=name)
147+
return redirect('ietf.secr.areas.views.view', name=name)
148148
else:
149-
return redirect('areas_view', name=name)
149+
return redirect('ietf.secr.areas.views.view', name=name)
150150
else:
151151
form = AreaForm(instance=area)
152152
awp_formset = AWPFormSet(instance=area)
@@ -215,7 +215,7 @@ def people(request, name):
215215
Role.objects.create(name_id='pre-ad',group=area,email=email,person=person)
216216

217217
messages.success(request, 'New Area Director added successfully!')
218-
return redirect('areas_view', name=name)
218+
return redirect('ietf.secr.areas.views.view', name=name)
219219
else:
220220
form = AreaDirectorForm()
221221

@@ -279,7 +279,7 @@ def modify(request, name):
279279

280280
messages.success(request, 'Voting rights have been granted successfully!')
281281

282-
return redirect('areas_view', name=name)
282+
return redirect('ietf.secr.areas.views.view', name=name)
283283

284284
@role_required('Secretariat')
285285
def view(request, name):

ietf/secr/templates/areas/list.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ <h2>Areas <span class="unlocked"><a href="add/" class="addlink">Add</a></span></
2525
<tbody>
2626
{% for item in results %}
2727
<tr class="{% cycle 'row1' 'row2' %} {{ item.state|lower }}">
28-
<td><a href="{% url "areas_view" name=item.acronym %}">{{ item.name }}</a></td>
28+
<td><a href="{% url "ietf.secr.areas.views.view" name=item.acronym %}">{{ item.name }}</a></td>
2929
<td>{{ item.acronym }}</td>
3030
<td>{{ item.state }}</td>
3131
</tr>

ietf/secr/templates/drafts/view.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
<h2>Draft - View</h2>
2222
<table class="full-width">
2323
<tr><td>Document Name:</td><td>{{ draft.title }}</td></tr>
24-
<tr><td>Area:</td><td>{% if draft.group.parent %}<a href="{% url "areas_view" name=draft.group.parent.acronym %}">{{ draft.group.parent }}{% endif %}</td></tr>
24+
<tr><td>Area:</td><td>{% if draft.group.parent %}<a href="{% url "ietf.secr.areas.views.view" name=draft.group.parent.acronym %}">{{ draft.group.parent }}{% endif %}</td></tr>
2525
<tr><td>Group:</td><td>{% if draft.group %}<a href="{% url "groups_view" acronym=draft.group.acronym %}">{{ draft.group.acronym }}{% endif %}</td></tr>
2626
<tr><td>Area Director:</td><td>{{ draft.ad }}</td></tr>
2727
<tr><td>Shepherd:</td><td>{% if draft.shepherd %}{{ draft.shepherd.person }} &lt;{{ draft.shepherd.address }}&gt;{% else %}None{% endif %}</td></tr>

ietf/secr/templates/groups/view.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ <h2>Groups - View</h2>
3333
{% endcomment %}
3434
<tr><td>Primary Area:</td>
3535
<td>{% if not group.parent %}(No Data){% else %}
36-
<a href="{% url "areas_view" name=group.parent.acronym %}">{{ group.parent }}</a>
36+
<a href="{% url "ietf.secr.areas.views.view" name=group.parent.acronym %}">{{ group.parent }}</a>
3737
{% endif %}
3838
</td>
3939
</tr>

ietf/secr/templates/main.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ <h3>IESG</h3>
1717
<td>
1818
<h3>IDs and WGs Process</h3>
1919
<li> <a href="{% url "drafts" %}"><b>Drafts</b></a></li><br>
20-
<li> <a href="{% url "areas" %}"><b>Areas</b></a></li><br>
20+
<li> <a href="{% url "ietf.secr.areas.views.list_areas" %}"><b>Areas</b></a></li><br>
2121
<li> <a href="{% url "groups" %}"><b>Groups</b></a></li><br>
2222
<li> <a href="{% url "rolodex" %}"><b>Rolodex</b></a></li><br>
2323
<li> <a href="{% url "roles" %}"><b>Roles</b></a></li><br>

ietf/secr/templates/rolodex/view.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ <h2><b>Roles</b></h2>
4444
<td>{{ role.name }} </td>
4545
<td>
4646
{% if role.group.type.slug == "area" %}
47-
<a href="{% url "areas_view" name=role.group.acronym %}">{{ role.group.acronym }}{% if role.group.state.slug == "conclude" %} (concluded){% endif %}</a>
47+
<a href="{% url "ietf.secr.areas.views.view" name=role.group.acronym %}">{{ role.group.acronym }}{% if role.group.state.slug == "conclude" %} (concluded){% endif %}</a>
4848
{% else %}
4949
<a href="{% url "groups_view" acronym=role.group.acronym %}">{{ role.group.acronym }}{% if role.group.state.slug == "conclude" %} (concluded){% endif %}</a>
5050
{% endif %}

0 commit comments

Comments
 (0)