mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-11-25 19:11:09 +00:00
fix tests and templates
This commit is contained in:
parent
01a56540d0
commit
d67903fd4b
4 changed files with 8 additions and 3 deletions
|
@ -7,6 +7,7 @@ from .activitypub_mixin import ActivityMixin
|
||||||
from .base_model import BookWyrmModel
|
from .base_model import BookWyrmModel
|
||||||
from . import fields
|
from . import fields
|
||||||
|
|
||||||
|
|
||||||
class Move(ActivityMixin, BookWyrmModel):
|
class Move(ActivityMixin, BookWyrmModel):
|
||||||
"""migrating an activitypub user account"""
|
"""migrating an activitypub user account"""
|
||||||
|
|
||||||
|
@ -31,6 +32,7 @@ class Move(ActivityMixin, BookWyrmModel):
|
||||||
|
|
||||||
activity_serializer = activitypub.Move
|
activity_serializer = activitypub.Move
|
||||||
|
|
||||||
|
|
||||||
class MoveUser(Move):
|
class MoveUser(Move):
|
||||||
"""migrating an activitypub user account"""
|
"""migrating an activitypub user account"""
|
||||||
|
|
||||||
|
|
|
@ -43,6 +43,7 @@
|
||||||
{% endspaceless %}
|
{% endspaceless %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
|
<div>
|
||||||
{% if user.moved_to %}
|
{% if user.moved_to %}
|
||||||
<div class="container my-6">
|
<div class="container my-6">
|
||||||
<div class="notification is-info has-text-centered">
|
<div class="notification is-info has-text-centered">
|
||||||
|
|
|
@ -88,9 +88,11 @@ class User(TestCase):
|
||||||
"https://www.w3.org/ns/activitystreams",
|
"https://www.w3.org/ns/activitystreams",
|
||||||
"https://w3id.org/security/v1",
|
"https://w3id.org/security/v1",
|
||||||
{
|
{
|
||||||
"manuallyApprovesFollowers": "as:manuallyApprovesFollowers",
|
|
||||||
"schema": "http://schema.org#",
|
|
||||||
"PropertyValue": "schema:PropertyValue",
|
"PropertyValue": "schema:PropertyValue",
|
||||||
|
"alsoKnownAs": {"@id": "as:alsoKnownAs", "@type": "@id"},
|
||||||
|
"manuallyApprovesFollowers": "as:manuallyApprovesFollowers",
|
||||||
|
"movedTo": {"@id": "as:movedTo", "@type": "@id"},
|
||||||
|
"schema": "http://schema.org#",
|
||||||
"value": "schema:value",
|
"value": "schema:value",
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
|
|
@ -43,7 +43,7 @@ class MoveUser(View):
|
||||||
|
|
||||||
except PermissionDenied:
|
except PermissionDenied:
|
||||||
form.errors["target"] = [
|
form.errors["target"] = [
|
||||||
"Set this user as an alias on the user you wish to move to before moving"
|
"Set this user as an alias on the user you are moving to first"
|
||||||
]
|
]
|
||||||
data = {"form": form, "user": request.user}
|
data = {"form": form, "user": request.user}
|
||||||
return TemplateResponse(request, "preferences/move_user.html", data)
|
return TemplateResponse(request, "preferences/move_user.html", data)
|
||||||
|
|
Loading…
Reference in a new issue