mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-11-29 21:11:16 +00:00
Python formatting
This commit is contained in:
parent
f0ae37c331
commit
4820a2f982
2 changed files with 10 additions and 6 deletions
|
@ -16,7 +16,11 @@ class Link(ActivitypubMixin, BookWyrmModel):
|
|||
|
||||
url = fields.URLField(max_length=255, activitypub_field="href")
|
||||
domain = models.ForeignKey(
|
||||
"LinkDomain", on_delete=models.CASCADE, null=True, blank=True, related_name="links"
|
||||
"LinkDomain",
|
||||
on_delete=models.CASCADE,
|
||||
null=True,
|
||||
blank=True,
|
||||
related_name="links",
|
||||
)
|
||||
|
||||
activity_serializer = activitypub.Link
|
||||
|
|
|
@ -20,9 +20,9 @@ class LinkDomain(View):
|
|||
def get(self, request, status):
|
||||
"""view pending domains"""
|
||||
data = {
|
||||
"domains": models.LinkDomain.objects.filter(
|
||||
status=status
|
||||
).prefetch_related("links"),
|
||||
"domains": models.LinkDomain.objects.filter(status=status).prefetch_related(
|
||||
"links"
|
||||
),
|
||||
"form": forms.EmailBlocklistForm(),
|
||||
"status": status,
|
||||
}
|
||||
|
@ -35,7 +35,7 @@ class LinkDomain(View):
|
|||
domain = get_object_or_404(models.LinkDomain, id=domain_id)
|
||||
form = forms.LinkDomainForm(request.POST, instance=domain)
|
||||
form.save()
|
||||
return redirect('settings-link-domain', status=status)
|
||||
return redirect("settings-link-domain", status=status)
|
||||
|
||||
|
||||
@require_POST
|
||||
|
@ -47,4 +47,4 @@ def update_domain_status(request, domain_id, status):
|
|||
|
||||
domain.status = status
|
||||
domain.save()
|
||||
return redirect('settings-link-domain', status="pending")
|
||||
return redirect("settings-link-domain", status="pending")
|
||||
|
|
Loading…
Reference in a new issue