summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2011-03-03 14:43:58 -0600
committerDan McGee <dan@archlinux.org>2011-03-03 14:44:02 -0600
commit710ec0a9de9a2185621cd7f51cdd2a056e12f999 (patch)
tree256a25509920fc64541b2bb5d8051697520152b7
parent0c368ce4661c91f77aa79f189c4be11de5d94d27 (diff)
Remove devel notify view
All of this can just be set on the main profile page. Signed-off-by: Dan McGee <dan@archlinux.org>
-rw-r--r--devel/tests.py7
-rw-r--r--devel/urls.py1
-rw-r--r--devel/views.py9
-rw-r--r--templates/devel/index.html9
4 files changed, 0 insertions, 26 deletions
diff --git a/devel/tests.py b/devel/tests.py
index 682f3d92..da5459d6 100644
--- a/devel/tests.py
+++ b/devel/tests.py
@@ -10,13 +10,6 @@ class DevelTest(TestCase):
self.assertEqual(response['location'],
'http://testserver/login/?next=/devel/')
- def test_notify(self):
- response = self.client.get('/devel/notify/')
- self.assertEqual(response.status_code, 302)
- self.assertEqual(response.has_header('Location'), True)
- self.assertEqual(response['location'],
- 'http://testserver/login/?next=/devel/notify/')
-
def test_profile(self):
response = self.client.get('/devel/profile/')
self.assertEqual(response.status_code, 302)
diff --git a/devel/urls.py b/devel/urls.py
index 0a050a92..bcf9c071 100644
--- a/devel/urls.py
+++ b/devel/urls.py
@@ -3,7 +3,6 @@ from django.conf.urls.defaults import patterns
urlpatterns = patterns('devel.views',
(r'^$', 'index'),
(r'^clock/$', 'clock'),
- (r'^notify/$', 'change_notify'),
(r'^profile/$', 'change_profile'),
(r'^newuser/$', 'new_user_form'),
)
diff --git a/devel/views.py b/devel/views.py
index b26c7af0..f89d6870 100644
--- a/devel/views.py
+++ b/devel/views.py
@@ -65,15 +65,6 @@ def clock(request):
return direct_to_template(request, 'devel/clock.html', page_dict)
-@login_required
-def change_notify(request):
- maint = User.objects.get(username=request.user.username)
- notify = request.POST.get('notify', 'no')
- prof = maint.get_profile()
- prof.notify = (notify == 'yes')
- prof.save()
- return HttpResponseRedirect('/devel/')
-
class ProfileForm(forms.Form):
email = forms.EmailField(label='Private email (not shown publicly):',
help_text="Used for out-of-date notifications, etc.")
diff --git a/templates/devel/index.html b/templates/devel/index.html
index cb9b92ae..08ca249a 100644
--- a/templates/devel/index.html
+++ b/templates/devel/index.html
@@ -89,15 +89,6 @@
</tbody>
</table>
- <form id="dash-pkg-notify" method="post" action="/devel/notify/">{% csrf_token %}
- <fieldset>
- <p><input id="notify" name="notify" type="checkbox" value="yes"
- {% if user.get_profile.notify %} checked="checked"{% endif %} />
- <label for="notify">Notify me when packages are flagged out-of-date</label>
- <input title="Update notification status" type="submit" value="Update" /></p>
- </fieldset>
- </form>
-
</div><!-- #dev-dashboard -->
<div id="dash-by-arch" class="dash-stats box">