PEP8 cleanups

This commit is contained in:
Roberto Rosario
2011-04-08 01:31:39 -04:00
parent 61fb876a81
commit 1b6806f7d1
13 changed files with 173 additions and 167 deletions
+4 -4
View File
@@ -6,7 +6,7 @@ from django.http import HttpResponseRedirect
def password_change_done(request):
'''View called when the new user password has been accepted'''
messages.success(request, _(u'Your password has been successfully changed.'))
return redirect('home')
@@ -14,10 +14,10 @@ def password_change_done(request):
def multi_object_action_view(request):
'''Proxy view called first when usuing a multi object action, which
then redirects to the appropiate specialized view'''
action = request.GET.get('action', None)
id_list = u','.join([key[3:] for key in request.GET.keys() if key.startswith('pk_')])
if not action:
messages.error(request, _(u'No action selected.'))
return HttpResponseRedirect(request.META.get('HTTP_REFERER', '/'))
@@ -25,5 +25,5 @@ def multi_object_action_view(request):
if not id_list:
messages.error(request, _(u'Must select at least one item.'))
return HttpResponseRedirect(request.META.get('HTTP_REFERER', '/'))
return HttpResponseRedirect('%s?id_list=%s' % (action, id_list))