We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Additional data fields for author
It would be nice if authors had "pseudonym" or "AKA" fields.
This would allow you to find works by the same author written under different pseudonyms.



--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `bookwyrm/views/author.py`
Content:
```
1 """ the good people stuff! the authors! """
2 from django.contrib.auth.decorators import login_required, permission_required
3 from django.db.models import Q
4 from django.shortcuts import get_object_or_404, redirect
5 from django.template.response import TemplateResponse
6 from django.utils.decorators import method_decorator
7 from django.views import View
8 
9 from bookwyrm import forms, models
10 from bookwyrm.activitypub import ActivitypubResponse
11 from .helpers import is_api_request
12 
13 
14 # pylint: disable= no-self-use
15 class Author(View):
16     """this person wrote a book"""
17 
18     def get(self, request, author_id):
19         """landing page for an author"""
20         author = get_object_or_404(models.Author, id=author_id)
21 
22         if is_api_request(request):
23             return ActivitypubResponse(author.to_activity())
24 
25         books = models.Work.objects.filter(
26             Q(authors=author) | Q(editions__authors=author)
27         ).distinct()
28         data = {
29             "author": author,
30             "books": [b.default_edition for b in books],
31         }
32         return TemplateResponse(request, "author.html", data)
33 
34 
35 @method_decorator(login_required, name="dispatch")
36 @method_decorator(
37     permission_required("bookwyrm.edit_book", raise_exception=True), name="dispatch"
38 )
39 class EditAuthor(View):
40     """edit author info"""
41 
42     def get(self, request, author_id):
43         """info about a book"""
44         author = get_object_or_404(models.Author, id=author_id)
45         data = {"author": author, "form": forms.AuthorForm(instance=author)}
46         return TemplateResponse(request, "edit_author.html", data)
47 
48     def post(self, request, author_id):
49         """edit a author cool"""
50         author = get_object_or_404(models.Author, id=author_id)
51 
52         form = forms.AuthorForm(request.POST, request.FILES, instance=author)
53         if not form.is_valid():
54             data = {"author": author, "form": form}
55             return TemplateResponse(request, "edit_author.html", data)
56         author = form.save()
57 
58         return redirect("/author/%s" % author.id)
59
```
--- 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/bookwyrm/views/author.py b/bookwyrm/views/author.py
--- a/bookwyrm/views/author.py
+++ b/bookwyrm/views/author.py
@@ -29,7 +29,7 @@
             "author": author,
             "books": [b.default_edition for b in books],
         }
-        return TemplateResponse(request, "author.html", data)
+        return TemplateResponse(request, "author/author.html", data)
 
 
 @method_decorator(login_required, name="dispatch")
@@ -43,7 +43,7 @@
         """info about a book"""
         author = get_object_or_404(models.Author, id=author_id)
         data = {"author": author, "form": forms.AuthorForm(instance=author)}
-        return TemplateResponse(request, "edit_author.html", data)
+        return TemplateResponse(request, "author/edit_author.html", data)
 
     def post(self, request, author_id):
         """edit a author cool"""
@@ -52,7 +52,7 @@
         form = forms.AuthorForm(request.POST, request.FILES, instance=author)
         if not form.is_valid():
             data = {"author": author, "form": form}
-            return TemplateResponse(request, "edit_author.html", data)
+            return TemplateResponse(request, "author/edit_author.html", data)
         author = form.save()
 
         return redirect("/author/%s" % author.id)

{"golden_diff": "diff --git a/bookwyrm/views/author.py b/bookwyrm/views/author.py\n--- a/bookwyrm/views/author.py\n+++ b/bookwyrm/views/author.py\n@@ -29,7 +29,7 @@\n             \"author\": author,\n             \"books\": [b.default_edition for b in books],\n         }\n-        return TemplateResponse(request, \"author.html\", data)\n+        return TemplateResponse(request, \"author/author.html\", data)\n \n \n @method_decorator(login_required, name=\"dispatch\")\n@@ -43,7 +43,7 @@\n         \"\"\"info about a book\"\"\"\n         author = get_object_or_404(models.Author, id=author_id)\n         data = {\"author\": author, \"form\": forms.AuthorForm(instance=author)}\n-        return TemplateResponse(request, \"edit_author.html\", data)\n+        return TemplateResponse(request, \"author/edit_author.html\", data)\n \n     def post(self, request, author_id):\n         \"\"\"edit a author cool\"\"\"\n@@ -52,7 +52,7 @@\n         form = forms.AuthorForm(request.POST, request.FILES, instance=author)\n         if not form.is_valid():\n             data = {\"author\": author, \"form\": form}\n-            return TemplateResponse(request, \"edit_author.html\", data)\n+            return TemplateResponse(request, \"author/edit_author.html\", data)\n         author = form.save()\n \n         return redirect(\"/author/%s\" % author.id)\n", "issue": "Additional data fields for author\nIt would be nice if authors had \"pseudonym\" or \"AKA\" fields.\r\nThis would allow you to find works by the same author written under different pseudonyms.\r\n\r\n\n", "before_files": [{"content": "\"\"\" the good people stuff! the authors! \"\"\"\nfrom django.contrib.auth.decorators import login_required, permission_required\nfrom django.db.models import Q\nfrom django.shortcuts import get_object_or_404, redirect\nfrom django.template.response import TemplateResponse\nfrom django.utils.decorators import method_decorator\nfrom django.views import View\n\nfrom bookwyrm import forms, models\nfrom bookwyrm.activitypub import ActivitypubResponse\nfrom .helpers import is_api_request\n\n\n# pylint: disable= no-self-use\nclass Author(View):\n    \"\"\"this person wrote a book\"\"\"\n\n    def get(self, request, author_id):\n        \"\"\"landing page for an author\"\"\"\n        author = get_object_or_404(models.Author, id=author_id)\n\n        if is_api_request(request):\n            return ActivitypubResponse(author.to_activity())\n\n        books = models.Work.objects.filter(\n            Q(authors=author) | Q(editions__authors=author)\n        ).distinct()\n        data = {\n            \"author\": author,\n            \"books\": [b.default_edition for b in books],\n        }\n        return TemplateResponse(request, \"author.html\", data)\n\n\n@method_decorator(login_required, name=\"dispatch\")\n@method_decorator(\n    permission_required(\"bookwyrm.edit_book\", raise_exception=True), name=\"dispatch\"\n)\nclass EditAuthor(View):\n    \"\"\"edit author info\"\"\"\n\n    def get(self, request, author_id):\n        \"\"\"info about a book\"\"\"\n        author = get_object_or_404(models.Author, id=author_id)\n        data = {\"author\": author, \"form\": forms.AuthorForm(instance=author)}\n        return TemplateResponse(request, \"edit_author.html\", data)\n\n    def post(self, request, author_id):\n        \"\"\"edit a author cool\"\"\"\n        author = get_object_or_404(models.Author, id=author_id)\n\n        form = forms.AuthorForm(request.POST, request.FILES, instance=author)\n        if not form.is_valid():\n            data = {\"author\": author, \"form\": form}\n            return TemplateResponse(request, \"edit_author.html\", data)\n        author = form.save()\n\n        return redirect(\"/author/%s\" % author.id)\n", "path": "bookwyrm/views/author.py"}], "after_files": [{"content": "\"\"\" the good people stuff! the authors! \"\"\"\nfrom django.contrib.auth.decorators import login_required, permission_required\nfrom django.db.models import Q\nfrom django.shortcuts import get_object_or_404, redirect\nfrom django.template.response import TemplateResponse\nfrom django.utils.decorators import method_decorator\nfrom django.views import View\n\nfrom bookwyrm import forms, models\nfrom bookwyrm.activitypub import ActivitypubResponse\nfrom .helpers import is_api_request\n\n\n# pylint: disable= no-self-use\nclass Author(View):\n    \"\"\"this person wrote a book\"\"\"\n\n    def get(self, request, author_id):\n        \"\"\"landing page for an author\"\"\"\n        author = get_object_or_404(models.Author, id=author_id)\n\n        if is_api_request(request):\n            return ActivitypubResponse(author.to_activity())\n\n        books = models.Work.objects.filter(\n            Q(authors=author) | Q(editions__authors=author)\n        ).distinct()\n        data = {\n            \"author\": author,\n            \"books\": [b.default_edition for b in books],\n        }\n        return TemplateResponse(request, \"author/author.html\", data)\n\n\n@method_decorator(login_required, name=\"dispatch\")\n@method_decorator(\n    permission_required(\"bookwyrm.edit_book\", raise_exception=True), name=\"dispatch\"\n)\nclass EditAuthor(View):\n    \"\"\"edit author info\"\"\"\n\n    def get(self, request, author_id):\n        \"\"\"info about a book\"\"\"\n        author = get_object_or_404(models.Author, id=author_id)\n        data = {\"author\": author, \"form\": forms.AuthorForm(instance=author)}\n        return TemplateResponse(request, \"author/edit_author.html\", data)\n\n    def post(self, request, author_id):\n        \"\"\"edit a author cool\"\"\"\n        author = get_object_or_404(models.Author, id=author_id)\n\n        form = forms.AuthorForm(request.POST, request.FILES, instance=author)\n        if not form.is_valid():\n            data = {\"author\": author, \"form\": form}\n            return TemplateResponse(request, \"author/edit_author.html\", data)\n        author = form.save()\n\n        return redirect(\"/author/%s\" % author.id)\n", "path": "bookwyrm/views/author.py"}]}