Skip to content
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
2 changes: 1 addition & 1 deletion rest_framework_latex/renderers.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def render(self, data, accepted_media_type=None, renderer_context=None):
"""
# Get latex
tex = super(LatexRenderer, self).render(
data, accepted_media_type, renderer_context)
{'data': data}, accepted_media_type, renderer_context)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Personally, I'd be keen to not change the expected behaviour when a dictionary is passed - this change will wrap:

data = {
  'key': 'val',
}

into

data = {
  'data': {
    'key': 'value'
  }
}

which would break existing applications depending on the data dictionary being passed verbatim in the template.


# Build tempoary directory
t_dir = tempfile.mkdtemp(prefix='drf_latex_')
Expand Down