We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN 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.


--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `wafer/pages/views.py`
Content:
```
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 FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

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):

{"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"}], "after_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\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"}]}