prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  Wafer page editing fails on Django 1.8 with ImproperlyConfigured: error
  As seen on Travis, and confirmed locally, attempting to edit a page bombs out, ending with
  
  "Specifying both 'fields' and 'form_class' is not permitted."
  ImproperlyConfigured: Specifying both 'fields' and 'form_class' is not permitted.
  
  
  </issue>
  <code>
  [start of wafer/pages/views.py]
  1 from django.http import Http404
  2 from django.core.exceptions import PermissionDenied
  3 from django.views.generic import DetailView, TemplateView, UpdateView
  4 
  5 from wafer.pages.models import Page
  6 from wafer.pages.forms import PageForm
  7 
  8 
  9 class ShowPage(DetailView):
  10     template_name = 'wafer.pages/page.html'
  11     model = Page
  12 
  13 
  14 class EditPage(UpdateView):
  15     template_name = 'wafer.pages/page_form.html'
  16     model = Page
  17     form_class = PageForm
  18     fields = ['name', 'content']
  19 
  20 
  21 def slug(request, url):
  22     """Look up a page by url (which is a tree of slugs)"""
  23     page = None
  24     for slug in url.split('/'):
  25         if not slug:
  26             continue
  27         try:
  28             page = Page.objects.get(slug=slug, parent=page)
  29         except Page.DoesNotExist:
  30             raise Http404
  31 
  32     if page is None:
  33         try:
  34             page = Page.objects.get(slug='index')
  35         except Page.DoesNotExist:
  36             return TemplateView.as_view(
  37                 template_name='wafer/index.html')(request)
  38 
  39     if 'edit' in request.GET.keys():
  40         if not request.user.has_perm('pages.change_page'):
  41             raise PermissionDenied
  42         return EditPage.as_view()(request, pk=page.id)
  43 
  44     return ShowPage.as_view()(request, pk=page.id)
  45
  [end of wafer/pages/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/wafer/pages/views.py b/wafer/pages/views.py
  --- a/wafer/pages/views.py
  +++ b/wafer/pages/views.py
  @@ -15,7 +15,6 @@
       template_name = 'wafer.pages/page_form.html'
       model = Page
       form_class = PageForm
  -    fields = ['name', 'content']
   
   
   def slug(request, url):
  
verification_info: {"golden_diff": "diff --git a/wafer/pages/views.py b/wafer/pages/views.py\n--- a/wafer/pages/views.py\n+++ b/wafer/pages/views.py\n@@ -15,7 +15,6 @@\n     template_name = 'wafer.pages/page_form.html'\n     model = Page\n     form_class = PageForm\n-    fields = ['name', 'content']\n \n \n def slug(request, url):\n", "issue": "Wafer page editing fails on Django 1.8 with ImproperlyConfigured: error\nAs seen on Travis, and confirmed locally, attempting to edit a page bombs out, ending with\n\n\"Specifying both 'fields' and 'form_class' is not permitted.\"\nImproperlyConfigured: Specifying both 'fields' and 'form_class' is not permitted.\n\n", "before_files": [{"content": "from django.http import Http404\nfrom django.core.exceptions import PermissionDenied\nfrom django.views.generic import DetailView, TemplateView, UpdateView\n\nfrom wafer.pages.models import Page\nfrom wafer.pages.forms import PageForm\n\n\nclass ShowPage(DetailView):\n    template_name = 'wafer.pages/page.html'\n    model = Page\n\n\nclass EditPage(UpdateView):\n    template_name = 'wafer.pages/page_form.html'\n    model = Page\n    form_class = PageForm\n    fields = ['name', 'content']\n\n\ndef slug(request, url):\n    \"\"\"Look up a page by url (which is a tree of slugs)\"\"\"\n    page = None\n    for slug in url.split('/'):\n        if not slug:\n            continue\n        try:\n            page = Page.objects.get(slug=slug, parent=page)\n        except Page.DoesNotExist:\n            raise Http404\n\n    if page is None:\n        try:\n            page = Page.objects.get(slug='index')\n        except Page.DoesNotExist:\n            return TemplateView.as_view(\n                template_name='wafer/index.html')(request)\n\n    if 'edit' in request.GET.keys():\n        if not request.user.has_perm('pages.change_page'):\n            raise PermissionDenied\n        return EditPage.as_view()(request, pk=page.id)\n\n    return ShowPage.as_view()(request, pk=page.id)\n", "path": "wafer/pages/views.py"}]}