prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  Corrigir caixa de busca do lexml com link quebrado
  http://sapl3.interlegis.leg.br/generico/lexml_pesquisar
  Verificar com @edwardoliveira qual caminho tomar quanto a isso!
  
  ![image](https://user-images.githubusercontent.com/9630623/53385017-be5bb880-395b-11e9-8e41-945cacc49a69.png)
  
  
  </issue>
  <code>
  [start of sapl/lexml/views.py]
  1 from django.http import HttpResponse
  2 
  3 from sapl.crud.base import CrudAux
  4 from sapl.lexml.OAIServer import OAIServerFactory, get_config
  5 
  6 from .models import LexmlProvedor, LexmlPublicador
  7 
  8 LexmlProvedorCrud = CrudAux.build(LexmlProvedor, 'lexml_provedor')
  9 LexmlPublicadorCrud = CrudAux.build(LexmlPublicador, 'lexml_publicador')
  10 
  11 
  12 def lexml_request(request):
  13     config = get_config(request.get_raw_uri(), int(request.GET.get('batch_size', 10)))
  14     oai_server = OAIServerFactory(config)
  15     r = oai_server.handleRequest(request.GET)
  16     response = r.decode('UTF-8')
  17     return HttpResponse(response, content_type='text/xml')
  18
  [end of sapl/lexml/views.py]
  [start of sapl/lexml/urls.py]
  1 from django.conf.urls import include, url
  2 
  3 from sapl.lexml.views import LexmlProvedorCrud, LexmlPublicadorCrud, lexml_request
  4 
  5 from .apps import AppConfig
  6 
  7 app_name = AppConfig.name
  8 
  9 urlpatterns = [
  10     url(r'^sistema/lexml/provedor/',
  11         include(LexmlProvedorCrud.get_urls())),
  12     url(r'^sistema/lexml/publicador/',
  13         include(LexmlPublicadorCrud.get_urls())),
  14     url(r'^sistema/lexml', lexml_request, name='lexml_endpoint')
  15 ]
  16
  [end of sapl/lexml/urls.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/sapl/lexml/urls.py b/sapl/lexml/urls.py
  --- a/sapl/lexml/urls.py
  +++ b/sapl/lexml/urls.py
  @@ -1,6 +1,6 @@
   from django.conf.urls import include, url
   
  -from sapl.lexml.views import LexmlProvedorCrud, LexmlPublicadorCrud, lexml_request
  +from sapl.lexml.views import LexmlProvedorCrud, LexmlPublicadorCrud, lexml_request, request_search
   
   from .apps import AppConfig
   
  @@ -11,5 +11,7 @@
           include(LexmlProvedorCrud.get_urls())),
       url(r'^sistema/lexml/publicador/',
           include(LexmlPublicadorCrud.get_urls())),
  -    url(r'^sistema/lexml', lexml_request, name='lexml_endpoint')
  +    url(r'^sistema/lexml/request_search/(?P<keyword>[\w\-]+)/', request_search, name='lexml_search'),
  +    url(r'^sistema/lexml', lexml_request, name='lexml_endpoint'),
  +
   ]
  diff --git a/sapl/lexml/views.py b/sapl/lexml/views.py
  --- a/sapl/lexml/views.py
  +++ b/sapl/lexml/views.py
  @@ -1,4 +1,5 @@
   from django.http import HttpResponse
  +from django.shortcuts import render
   
   from sapl.crud.base import CrudAux
   from sapl.lexml.OAIServer import OAIServerFactory, get_config
  @@ -16,3 +17,6 @@
                                     'metadataPrefix': request.GET.get('metadataPrefix', 'oai_lexml')})
       response = r.decode('UTF-8')
       return HttpResponse(response, content_type='text/xml')
  +
  +def request_search(request, keyword):
  +    return render(request,"lexml/resultado-pesquisa.html",{"keyword":keyword})
  \ No newline at end of file
  
verification_info: {"golden_diff": "diff --git a/sapl/lexml/urls.py b/sapl/lexml/urls.py\n--- a/sapl/lexml/urls.py\n+++ b/sapl/lexml/urls.py\n@@ -1,6 +1,6 @@\n from django.conf.urls import include, url\n \n-from sapl.lexml.views import LexmlProvedorCrud, LexmlPublicadorCrud, lexml_request\n+from sapl.lexml.views import LexmlProvedorCrud, LexmlPublicadorCrud, lexml_request, request_search\n \n from .apps import AppConfig\n \n@@ -11,5 +11,7 @@\n         include(LexmlProvedorCrud.get_urls())),\n     url(r'^sistema/lexml/publicador/',\n         include(LexmlPublicadorCrud.get_urls())),\n-    url(r'^sistema/lexml', lexml_request, name='lexml_endpoint')\n+    url(r'^sistema/lexml/request_search/(?P<keyword>[\\w\\-]+)/', request_search, name='lexml_search'),\n+    url(r'^sistema/lexml', lexml_request, name='lexml_endpoint'),\n+\n ]\ndiff --git a/sapl/lexml/views.py b/sapl/lexml/views.py\n--- a/sapl/lexml/views.py\n+++ b/sapl/lexml/views.py\n@@ -1,4 +1,5 @@\n from django.http import HttpResponse\n+from django.shortcuts import render\n \n from sapl.crud.base import CrudAux\n from sapl.lexml.OAIServer import OAIServerFactory, get_config\n@@ -16,3 +17,6 @@\n                                   'metadataPrefix': request.GET.get('metadataPrefix', 'oai_lexml')})\n     response = r.decode('UTF-8')\n     return HttpResponse(response, content_type='text/xml')\n+\n+def request_search(request, keyword):\n+    return render(request,\"lexml/resultado-pesquisa.html\",{\"keyword\":keyword})\n\\ No newline at end of file\n", "issue": "Corrigir caixa de busca do lexml com link quebrado\nhttp://sapl3.interlegis.leg.br/generico/lexml_pesquisar\r\nVerificar com @edwardoliveira qual caminho tomar quanto a isso!\r\n\r\n![image](https://user-images.githubusercontent.com/9630623/53385017-be5bb880-395b-11e9-8e41-945cacc49a69.png)\r\n\n", "before_files": [{"content": "from django.http import HttpResponse\n\nfrom sapl.crud.base import CrudAux\nfrom sapl.lexml.OAIServer import OAIServerFactory, get_config\n\nfrom .models import LexmlProvedor, LexmlPublicador\n\nLexmlProvedorCrud = CrudAux.build(LexmlProvedor, 'lexml_provedor')\nLexmlPublicadorCrud = CrudAux.build(LexmlPublicador, 'lexml_publicador')\n\n\ndef lexml_request(request):\n    config = get_config(request.get_raw_uri(), int(request.GET.get('batch_size', 10)))\n    oai_server = OAIServerFactory(config)\n    r = oai_server.handleRequest(request.GET)\n    response = r.decode('UTF-8')\n    return HttpResponse(response, content_type='text/xml')\n", "path": "sapl/lexml/views.py"}, {"content": "from django.conf.urls import include, url\n\nfrom sapl.lexml.views import LexmlProvedorCrud, LexmlPublicadorCrud, lexml_request\n\nfrom .apps import AppConfig\n\napp_name = AppConfig.name\n\nurlpatterns = [\n    url(r'^sistema/lexml/provedor/',\n        include(LexmlProvedorCrud.get_urls())),\n    url(r'^sistema/lexml/publicador/',\n        include(LexmlPublicadorCrud.get_urls())),\n    url(r'^sistema/lexml', lexml_request, name='lexml_endpoint')\n]\n", "path": "sapl/lexml/urls.py"}]}