views: pep8ness (#23303)
This commit is contained in:
parent
4a647bf496
commit
a23bfd4433
|
@ -21,7 +21,6 @@ from django.contrib.auth import get_user_model
|
|||
from django.views.generic.base import TemplateView
|
||||
from django.core.exceptions import PermissionDenied
|
||||
from django.core.urlresolvers import reverse
|
||||
from django.shortcuts import get_object_or_404
|
||||
from django.http import HttpResponse, HttpResponseRedirect, Http404
|
||||
from django.db.transaction import atomic
|
||||
|
||||
|
@ -205,7 +204,9 @@ class Validation(UserEditCoreView):
|
|||
def get_context_data(self, **kwargs):
|
||||
ctx = super(Validation, self).get_context_data(**kwargs)
|
||||
ctx['validation_request'] = self.validation_request
|
||||
ctx['attachment_urls'] = [reverse('cut-manager-user-validation-attachment', kwargs={'pk': attachment.pk}) for attachment in self.validation_request.attachments.all()]
|
||||
ctx['attachment_urls'] = [
|
||||
reverse('cut-manager-user-validation-attachment', kwargs={'pk': attachment.pk})
|
||||
for attachment in self.validation_request.attachments.all()]
|
||||
ctx['action'] = u'Valider'
|
||||
ctx['validation_form'] = forms.ValidationForm()
|
||||
return ctx
|
||||
|
@ -224,10 +225,9 @@ class Validation(UserEditCoreView):
|
|||
return self.next_request(request)
|
||||
elif 'validate' in request.POST:
|
||||
return super(Validation, self).post(request, *args, **kwargs)
|
||||
else: # next
|
||||
else: # next
|
||||
return self.next_request(request)
|
||||
|
||||
|
||||
def next_request(self, request):
|
||||
# on ne trouve plus de requête de validation après celle-ci
|
||||
# recommençons du début
|
||||
|
|
Loading…
Reference in New Issue