Remove devel notify view
All of this can just be set on the main profile page. Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
parent
0c368ce466
commit
710ec0a9de
@ -10,13 +10,6 @@ def test_index(self):
|
||||
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)
|
||||
|
@ -3,7 +3,6 @@
|
||||
urlpatterns = patterns('devel.views',
|
||||
(r'^$', 'index'),
|
||||
(r'^clock/$', 'clock'),
|
||||
(r'^notify/$', 'change_notify'),
|
||||
(r'^profile/$', 'change_profile'),
|
||||
(r'^newuser/$', 'new_user_form'),
|
||||
)
|
||||
|
@ -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.")
|
||||
|
@ -89,15 +89,6 @@ <h3>Package Todo Lists</h3>
|
||||
</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">
|
||||
|
Loading…
Reference in New Issue
Block a user