Commit ac8978a5 authored by Jeremy Kerr's avatar Jeremy Kerr
Browse files

views/patch: remove unused code

The number of times I've edited this code and wondered why nothing
Signed-off-by: default avatarJeremy Kerr <>
parent 73960c43
......@@ -131,55 +131,3 @@ def list(request, project_id):
context = generic_list(request, project, 'patchwork.views.patch.list',
view_args = {'project_id': project.linkname})
return render_to_response('patchwork/list.html', context)
context = PatchworkRequestContext(request,
list_view = 'patchwork.views.patch.list',
list_view_params = {'project_id': project_id})
order = get_order(request)
project = get_object_or_404(Project, linkname=project_id)
context.project = project
form = None
errors = []
if request.method == 'POST':
action = request.POST.get('action', None)
if action:
action = action.lower()
# special case: the user may have hit enter in the 'create bundle'
# text field, so if non-empty, assume the create action:
if request.POST.get('bundle_name', False):
action = 'create'
ps = []
for patch_id in get_patch_ids(request.POST):
patch = Patch.objects.get(id = patch_id)
except Patch.DoesNotExist:
(errors, form) = set_patches(request.user, project, action, \
request.POST, ps)
if errors:
context['errors'] = errors
elif request.user.is_authenticated() and \
project in request.user.get_profile().maintainer_projects.all():
form = MultiplePatchForm(project)
patches = Patch.objects.filter(project=project).order_by(order)
patches = context.filters.apply(patches)
paginator = Paginator(request, patches)
'page': paginator.current_page,
'patchform': form,
'project': project,
'errors': errors,
return render_to_response('patchwork/list.html', context)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment