Runs black
This commit is contained in:
@ -2,6 +2,7 @@ from django.http import JsonResponse
|
||||
|
||||
from .base_activity import ActivityEncoder
|
||||
|
||||
|
||||
class ActivitypubResponse(JsonResponse):
|
||||
"""
|
||||
A class to be used in any place that's serializing responses for
|
||||
@ -9,10 +10,17 @@ class ActivitypubResponse(JsonResponse):
|
||||
configures some stuff beforehand. Made to be a drop-in replacement of
|
||||
JsonResponse.
|
||||
"""
|
||||
def __init__(self, data, encoder=ActivityEncoder, safe=False,
|
||||
json_dumps_params=None, **kwargs):
|
||||
|
||||
if 'content_type' not in kwargs:
|
||||
kwargs['content_type'] = 'application/activity+json'
|
||||
def __init__(
|
||||
self,
|
||||
data,
|
||||
encoder=ActivityEncoder,
|
||||
safe=False,
|
||||
json_dumps_params=None,
|
||||
**kwargs
|
||||
):
|
||||
|
||||
if "content_type" not in kwargs:
|
||||
kwargs["content_type"] = "application/activity+json"
|
||||
|
||||
super().__init__(data, encoder, safe, json_dumps_params, **kwargs)
|
||||
|
Reference in New Issue
Block a user