Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add args and kwargs to serialize so we can call super and avoid importin... #24

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions restless/modelviews.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,15 @@ def get_query_set(self, request, *args, **kwargs):
else:
raise HttpError(404, 'Resource Not Found')

def serialize(self, objs):
def serialize(self, objs, *args, **kwargs):
"""Serialize the objects in the response.

By default, the method uses the :py:func:`restless.models.serialize`
function to serialize the objects with default behaviour. Override the
method to customize the serialization.
"""

return serialize(objs)
return serialize(objs, *args, **kwargs)

def get(self, request, *args, **kwargs):
"""Return a serialized list of objects in this endpoint."""
Expand Down