prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  Add robots meta tag and "nofollow" link attribute
  1. Fragile pages should be not indexed by search engines.
  ```
  <meta name=”robots” content=”nofollow, noindex”>
  ```
  - [x] Add above meta tag to order's confirmation page
  
  2. Pages that brings no to little content value should not be crawled
  ```
  <meta name=”robots” content=”nofollow”>
  ```
  - [x] Add above meta tag to sign in/sign up/cart pages 
  3.  Add link attribute
  - [x] Links pointing to above pages should have set attribute `rel="nofollow"` 
  
  </issue>
  <code>
  [start of saleor/core/views.py]
  1 from __future__ import unicode_literals
  2 
  3 from django.template.response import TemplateResponse
  4 from django.contrib import messages
  5 from django.conf import settings
  6 from django.utils.translation import pgettext_lazy
  7 from impersonate.views import impersonate as orig_impersonate
  8 
  9 from ..dashboard.views import staff_member_required
  10 from ..product.utils import products_with_availability, products_for_homepage
  11 from ..userprofile.models import User
  12 
  13 
  14 def home(request):
  15     products = products_for_homepage()[:8]
  16     products = products_with_availability(
  17         products, discounts=request.discounts, local_currency=request.currency)
  18     return TemplateResponse(
  19         request, 'home.html',
  20         {'products': products, 'parent': None})
  21 
  22 
  23 @staff_member_required
  24 def styleguide(request):
  25     return TemplateResponse(request, 'styleguide.html')
  26 
  27 
  28 def impersonate(request, uid):
  29     response = orig_impersonate(request, uid)
  30     if request.session.modified:
  31         msg = pgettext_lazy(
  32             'Impersonation message',
  33             'You are now logged as {}'.format(User.objects.get(pk=uid)))
  34         messages.success(request, msg)
  35     return response
  36
  [end of saleor/core/views.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/saleor/core/views.py b/saleor/core/views.py
  --- a/saleor/core/views.py
  +++ b/saleor/core/views.py
  @@ -2,7 +2,6 @@
   
   from django.template.response import TemplateResponse
   from django.contrib import messages
  -from django.conf import settings
   from django.utils.translation import pgettext_lazy
   from impersonate.views import impersonate as orig_impersonate
  
verification_info: {"golden_diff": "diff --git a/saleor/core/views.py b/saleor/core/views.py\n--- a/saleor/core/views.py\n+++ b/saleor/core/views.py\n@@ -2,7 +2,6 @@\n \n from django.template.response import TemplateResponse\n from django.contrib import messages\n-from django.conf import settings\n from django.utils.translation import pgettext_lazy\n from impersonate.views import impersonate as orig_impersonate\n", "issue": "Add robots meta tag and \"nofollow\" link attribute\n1. Fragile pages should be not indexed by search engines.\r\n```\r\n<meta name=\u201drobots\u201d content=\u201dnofollow, noindex\u201d>\r\n```\r\n- [x] Add above meta tag to order's confirmation page\r\n\r\n2. Pages that brings no to little content value should not be crawled\r\n```\r\n<meta name=\u201drobots\u201d content=\u201dnofollow\u201d>\r\n```\r\n- [x] Add above meta tag to sign in/sign up/cart pages \r\n3.  Add link attribute\r\n- [x] Links pointing to above pages should have set attribute `rel=\"nofollow\"` \n", "before_files": [{"content": "from __future__ import unicode_literals\n\nfrom django.template.response import TemplateResponse\nfrom django.contrib import messages\nfrom django.conf import settings\nfrom django.utils.translation import pgettext_lazy\nfrom impersonate.views import impersonate as orig_impersonate\n\nfrom ..dashboard.views import staff_member_required\nfrom ..product.utils import products_with_availability, products_for_homepage\nfrom ..userprofile.models import User\n\n\ndef home(request):\n    products = products_for_homepage()[:8]\n    products = products_with_availability(\n        products, discounts=request.discounts, local_currency=request.currency)\n    return TemplateResponse(\n        request, 'home.html',\n        {'products': products, 'parent': None})\n\n\n@staff_member_required\ndef styleguide(request):\n    return TemplateResponse(request, 'styleguide.html')\n\n\ndef impersonate(request, uid):\n    response = orig_impersonate(request, uid)\n    if request.session.modified:\n        msg = pgettext_lazy(\n            'Impersonation message',\n            'You are now logged as {}'.format(User.objects.get(pk=uid)))\n        messages.success(request, msg)\n    return response\n", "path": "saleor/core/views.py"}]}