python - When trying to display a chart using ChartIt, Error saying template does not exist arises -


i using chartit , keep receiving "template not exist" when trying view chart @ url. tutorial being followed properly, may have made mistake somewhere. new django, appreciated. request load chart working def being called.

def in views.py file.

def linechart(request):     commitdata = \         datapool(             series=             [{'options': {                 'source': testcommit.objects.all()[:200]}, 'terms': ['author', 'author_time']}])      linechart = chart(         datasource=commitdata,         series_options=         [{'options': {             'type': 'line',             'stacking': false},           'terms': {               'author_time': [                   'author_time']           }}],         chart_options=         {'title': {             'text': 'yays'},          'xaxis': {              'title': {                  'text': 'month number'}}})       return render_to_response({'testcommits.html': linechart}) 

testcommits.html

<head>     <!-- code include highcharts , jquery libraries goes here -->     <!-- load_charts filter takes comma-separated list of id's -->     <!-- charts need rendered                             -->     <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js" type="text/javascript"></script>     <script src="http://code.highcharts.com/highcharts.js" type="text/javascript"></script>     <script src="/highcharts.js" type="text/javascript"></script>     {% load chartit %}     {{ linechart|load_charts:"container" }} </head> <body>     <div id='container'> chart rendered here </div> </body> 

i noticed in installation instructions don't add 'chartit' installed_apps in settings file, did in demo project. have done that?

edit: dan-klasson correct. need specify template return. view should returning following:

return render_to_response('testcommits.html', {'linechart': linechart}) 

the dictionary context in passed template. first argument template name, in case testcommits.html.


Comments

Popular posts from this blog

Issues changing the value of an element in an array in matlab -

php - MySQLi binding parameters in a prepared statement doesn't work unless inserted after "WHERE" -

vb.net - Alternative to the T-SQL AS keyword -