From 710ec0a9de9a2185621cd7f51cdd2a056e12f999 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Thu, 3 Mar 2011 14:43:58 -0600 Subject: Remove devel notify view All of this can just be set on the main profile page. Signed-off-by: Dan McGee --- devel/tests.py | 7 ------- devel/urls.py | 1 - devel/views.py | 9 --------- 3 files changed, 17 deletions(-) (limited to 'devel') diff --git a/devel/tests.py b/devel/tests.py index 682f3d9..da5459d 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 0a050a9..bcf9c07 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 b26c7af..f89d687 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.") -- cgit v1.2.3-24-g4f1b