Commit 6285dd81 authored by Guilhem Saurel's avatar Guilhem Saurel
Browse files

docker view: immutable querydict

parent c27fe882
Pipeline #558 passed with stages
in 55 seconds
......@@ -98,7 +98,8 @@ def docker(request):
cmd = 'build'
if 'cmd' in request.GET and request.GET['cmd'] in ['push', 'pull', 'build']:
cmd = request.GET.pop('cmd')
if 'target' in request.GET:
request.GET['target'] = int(utils.TARGETS.__getitem__(request.GET['target']))
images = models.Image.objects.filter(**request.GET.dict())
filters = request.GET.dict()
if 'target' in filters:
filters['target'] = int(utils.TARGETS.__getitem__(filters['target']))
images = models.Image.objects.filter(**filters)
return HttpResponse('\n'.join([' '.join(getattr(image, cmd)()) for image in images]), content_type="text/plain")
Supports Markdown
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