Skip to content Skip to sidebar Skip to footer

Django - 'safetext' Object Has No Attribute 'get'

I'm trying to display a chart with help of Highchart by following this solution: Passing Django Database Queryset to Highcharts via JSON But I keep getting this error: 'SafeText' o

Solution 1:

It looks like chartViewHigh is not a valid Django view. Every Django view takes an HttpRequest object as its first parameter, typically called request - but chartViewHigh does not.

See this page of the docs for the essentials of a Django view: https://docs.djangoproject.com/en/1.11/topics/http/views/

And see the answer to this question, which is the same problem: Django + trac-wiki to html markdown 'SafeText' object has no attribute 'get' - the error message arises because the function is not taking a request and returning a response object.

Also I don't think render_template is a Django shortcut - is it Flask?

Post a Comment for "Django - 'safetext' Object Has No Attribute 'get'"