prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  use list markup for lists of elements
  Part of the BITV-Test: "1.3.1b HTML-Strukturelemente für Listen"
  ----
  - [x] list of blueprints
  - [x] list of projects
  
  unsure:
  - [ ] list of questions in poll contents
  - [ ] list of choices in poll contents 
  
  </issue>
  <code>
  [start of apps/contrib/templatetags/contrib_tags.py]
  1 from django import template
  2 from django.template.loader import render_to_string
  3 
  4 register = template.Library()
  5 
  6 
  7 @register.assignment_tag
  8 def include_template_string(template, **kwargs):
  9     rendered_template = render_to_string(template, kwargs)
  10     return str(rendered_template)
  11 
  12 
  13 @register.assignment_tag
  14 def combined_url_parameter(request_query_dict, **kwargs):
  15     combined_query_dict = request_query_dict.copy()
  16     for key in kwargs:
  17         combined_query_dict.setlist(key, [kwargs[key]])
  18     encoded_parameter = '?' + combined_query_dict.urlencode()
  19     return encoded_parameter
  20 
  21 
  22 @register.assignment_tag
  23 def filter_has_perm(perm, user, objects):
  24     """Filter a list of objects based on user permissions."""
  25     if not hasattr(user, 'has_perm'):
  26         # If the swapped user model does not support permissions, all objects
  27         # will be returned. This is taken from rules.templatetags.has_perm.
  28         return objects
  29     else:
  30         return (obj for obj in objects if user.has_perm(perm, obj))
  31
  [end of apps/contrib/templatetags/contrib_tags.py]
  </code>
  
  I need you to solve this issue by generating a single patch file that I can apply directly to this repository using git apply. Please respond with a single patch file in the following format.
  <patch>
  diff --git a/file.py b/file.py
  --- a/file.py
  +++ b/file.py
  @@ -1,27 +1,35 @@
   def euclidean(a, b):
  -    while b:
  -        a, b = b, a % b
  -    return a
  +    if b == 0:
  +        return a
  +    return euclidean(b, a % b)
   
   
   def bresenham(x0, y0, x1, y1):
       points = []
       dx = abs(x1 - x0)
       dy = abs(y1 - y0)
  -    sx = 1 if x0 < x1 else -1
  -    sy = 1 if y0 < y1 else -1
  -    err = dx - dy
  +    x, y = x0, y0
  +    sx = -1 if x0 > x1 else 1
  +    sy = -1 if y0 > y1 else 1
   
  -    while True:
  -        points.append((x0, y0))
  -        if x0 == x1 and y0 == y1:
  -            break
  -        e2 = 2 * err
  -        if e2 > -dy:
  -            err -= dy
  -            x0 += sx
  -        if e2 < dx:
  -            err += dx
  -            y0 += sy
  +    if dx > dy:
  +        err = dx / 2.0
  +        while x != x1:
  +            points.append((x, y))
  +            err -= dy
  +            if err < 0:
  +                y += sy
  +                err += dx
  +            x += sx
  +    else:
  +        err = dy / 2.0
  +        while y != y1:
  +            points.append((x, y))
  +            err -= dx
  +            if err < 0:
  +                x += sx
  +                err += dy
  +            y += sy
  +
  +    points.append((x, y))
       return points
  
  </patch>
golden_diff: diff --git a/apps/contrib/templatetags/contrib_tags.py b/apps/contrib/templatetags/contrib_tags.py
  --- a/apps/contrib/templatetags/contrib_tags.py
  +++ b/apps/contrib/templatetags/contrib_tags.py
  @@ -27,4 +27,4 @@
           # will be returned. This is taken from rules.templatetags.has_perm.
           return objects
       else:
  -        return (obj for obj in objects if user.has_perm(perm, obj))
  +        return [obj for obj in objects if user.has_perm(perm, obj)]
  
verification_info: {"golden_diff": "diff --git a/apps/contrib/templatetags/contrib_tags.py b/apps/contrib/templatetags/contrib_tags.py\n--- a/apps/contrib/templatetags/contrib_tags.py\n+++ b/apps/contrib/templatetags/contrib_tags.py\n@@ -27,4 +27,4 @@\n         # will be returned. This is taken from rules.templatetags.has_perm.\n         return objects\n     else:\n-        return (obj for obj in objects if user.has_perm(perm, obj))\n+        return [obj for obj in objects if user.has_perm(perm, obj)]\n", "issue": "use list markup for lists of elements\nPart of the BITV-Test: \"1.3.1b HTML-Strukturelemente f\u00fcr Listen\"\r\n----\r\n- [x] list of blueprints\r\n- [x] list of projects\r\n\r\nunsure:\r\n- [ ] list of questions in poll contents\r\n- [ ] list of choices in poll contents \n", "before_files": [{"content": "from django import template\nfrom django.template.loader import render_to_string\n\nregister = template.Library()\n\n\n@register.assignment_tag\ndef include_template_string(template, **kwargs):\n    rendered_template = render_to_string(template, kwargs)\n    return str(rendered_template)\n\n\n@register.assignment_tag\ndef combined_url_parameter(request_query_dict, **kwargs):\n    combined_query_dict = request_query_dict.copy()\n    for key in kwargs:\n        combined_query_dict.setlist(key, [kwargs[key]])\n    encoded_parameter = '?' + combined_query_dict.urlencode()\n    return encoded_parameter\n\n\n@register.assignment_tag\ndef filter_has_perm(perm, user, objects):\n    \"\"\"Filter a list of objects based on user permissions.\"\"\"\n    if not hasattr(user, 'has_perm'):\n        # If the swapped user model does not support permissions, all objects\n        # will be returned. This is taken from rules.templatetags.has_perm.\n        return objects\n    else:\n        return (obj for obj in objects if user.has_perm(perm, obj))\n", "path": "apps/contrib/templatetags/contrib_tags.py"}]}