1π
The url you are calling is /structure/showtrees
, but in the urls.py file that you provided, you have only defined /showtrees
. That is causing your error. To fix that, change your JS call to /showtrees
or insert your urls.py file inside a new app called structure
It seems that you are using a Structure.objects.get , somewhere and Django raises a DoesNotExists exception. Check that your structure object exists on your DB.
Your problem is on this line :
crystal = Structure.objects.get(pdb_code__index=pdbname)
Check your filters on that queryset.
π€Benjy Malca
0π
Ok, I found the problem in my code, one of the urls in urls.py had a regexp that grabbed any string passed, and thus instead of invoking this:
url(r'^showtrees', views.RenderTrees, name='render')
it invoked the other function. Thanks for help!
π€Mee
- Getting javascript array from django json dumped dictionary
- How to create nested form in django?
- Show ASCII characters in django template (python 2)
Source:stackexchange.com