Skip to content

Instantly share code, notes, and snippets.

@matthisk
Last active May 31, 2017 13:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save matthisk/2a935725b5f02817fc1ab0710f5aa20b to your computer and use it in GitHub Desktop.
Save matthisk/2a935725b5f02817fc1ab0710f5aa20b to your computer and use it in GitHub Desktop.
from functools import partial
def some_view(request):
line_chart = LineChart()
render(request, 'template.html', {
'line_chart_as_html_200': partial(line_chart.as_html, line_chart, '200'),
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment