diff options
Diffstat (limited to 'apps/patchwork/views')
-rw-r--r-- | apps/patchwork/views/__init__.py | 4 | ||||
-rw-r--r-- | apps/patchwork/views/base.py | 6 | ||||
-rw-r--r-- | apps/patchwork/views/patch.py | 20 | ||||
-rw-r--r-- | apps/patchwork/views/user.py | 4 |
4 files changed, 17 insertions, 17 deletions
diff --git a/apps/patchwork/views/__init__.py b/apps/patchwork/views/__init__.py index b5c19c2..16a84cc 100644 --- a/apps/patchwork/views/__init__.py +++ b/apps/patchwork/views/__init__.py @@ -55,12 +55,12 @@ def generic_list(request, project, view, ps.append(patch) (errors, form) = set_patches(request.user, project, action, \ - request.POST, ps, context) + request.POST, ps, context) if errors: context['errors'] = errors if not (request.user.is_authenticated() and \ - project in request.user.get_profile().maintainer_projects.all()): + project in request.user.get_profile().maintainer_projects.all()): form = None for (filterclass, setting) in filter_settings: diff --git a/apps/patchwork/views/base.py b/apps/patchwork/views/base.py index b3b1c12..a09ced0 100644 --- a/apps/patchwork/views/base.py +++ b/apps/patchwork/views/base.py @@ -60,9 +60,9 @@ def submitter_complete(request): search = request.GET.get('q', '') response = HttpResponse(mimetype = "text/plain") if len(search) > 3: - queryset = Person.objects.filter(name__icontains = search) - json_serializer = serializers.get_serializer("json")() - json_serializer.serialize(queryset, ensure_ascii=False, stream=response) + queryset = Person.objects.filter(name__icontains = search) + json_serializer = serializers.get_serializer("json")() + json_serializer.serialize(queryset, ensure_ascii=False, stream=response) return response help_pages = {'': 'index.html', 'about/': 'about.html'} diff --git a/apps/patchwork/views/patch.py b/apps/patchwork/views/patch.py index c0960c1..72472ca 100644 --- a/apps/patchwork/views/patch.py +++ b/apps/patchwork/views/patch.py @@ -25,7 +25,7 @@ from patchwork.utils import get_patch_ids, set_patches, Order from patchwork.requestcontext import PatchworkRequestContext from django.shortcuts import render_to_response, get_object_or_404 from django.http import HttpResponse, HttpResponseRedirect, \ - HttpResponseForbidden + HttpResponseForbidden from django.contrib.auth.models import User from django.contrib.auth.decorators import login_required from django.contrib.auth import authenticate, login @@ -71,7 +71,7 @@ def patch(request, patch_id): bundle.save() context.add_message('Patch added to bundle "%s"' % bundle.name) - # all other actions require edit privs + # all other actions require edit privs elif not editable: return HttpResponseForbidden() @@ -81,14 +81,14 @@ def patch(request, patch_id): form.save() context.add_message('Patch updated') - elif action == 'archive': - patch.archived = True - patch.save() + elif action == 'archive': + patch.archived = True + patch.save() context.add_message('Patch archived') - elif action == 'unarchive': - patch.archived = False - patch.save() + elif action == 'unarchive': + patch.archived = False + patch.save() context.add_message('Patch un-archived') elif action == 'ack': @@ -157,13 +157,13 @@ def list(request, project_id): ps.append(patch) (errors, form) = set_patches(request.user, project, action, \ - request.POST, ps) + request.POST, ps) if errors: context['errors'] = errors elif request.user.is_authenticated() and \ - project in request.user.get_profile().maintainer_projects.all(): + project in request.user.get_profile().maintainer_projects.all(): form = MultiplePatchForm(project) patches = Patch.objects.filter(project=project).order_by(order) diff --git a/apps/patchwork/views/user.py b/apps/patchwork/views/user.py index 19091d3..b042d35 100644 --- a/apps/patchwork/views/user.py +++ b/apps/patchwork/views/user.py @@ -24,9 +24,9 @@ from django.shortcuts import render_to_response, get_object_or_404 from django.contrib import auth from django.http import HttpResponse, HttpResponseRedirect from patchwork.models import Project, Patch, Bundle, Person, UserProfile, \ - UserPersonConfirmation, State + UserPersonConfirmation, State from patchwork.forms import MultiplePatchForm, UserProfileForm, \ - UserPersonLinkForm + UserPersonLinkForm from patchwork.utils import Order, get_patch_ids from patchwork.filters import DelegateFilter from patchwork.paginator import Paginator |