django-backbone-example
django-backbone-example copied to clipboard
KeyError in tweets/views.py
I am trying the project on Django 1.5.1 and it seems to work fine, except for when the view of an individual tweet is refreshed or requested ie. accessing mydomain.com/number. The tweet is served up fine by the javascript in the browser if navigated to from a link on the main page but accessing the same URL gives:
KeyError at /4/
'params'
Request Method: GET
Request URL: http://31.22.116.153:8000/4/
Django Version: 1.5.1
Exception Type: KeyError
Exception Value:
'params'
Exception Location: /home/vennyoudjango/tweets/views.py in get_context_data, line 28
Python Executable: /usr/bin/python
Python Version: 2.7.3
Python Path:
['/home/vennyoudjango',
'/usr/lib/python2.7',
'/usr/lib/python2.7/plat-linux2',
'/usr/lib/python2.7/lib-tk',
'/usr/lib/python2.7/lib-old',
'/usr/lib/python2.7/lib-dynload',
'/usr/local/lib/python2.7/dist-packages',
'/usr/lib/python2.7/dist-packages']
Server time: Tue, 16 Apr 2013 17:17:33 +0100
I have tried passing different parameters into get_context_data on the basis that it might be something to do with this:
http://stackoverflow.com/questions/15157071/tastypie-nested-resources-cached-obj-get-takes-exactly-2-arguments-1-given
but I still can't seem to get it to work. Thanks for putting the project up, it has been very useful learning material. Best, Mark