We are moving our API from Django - Piston to Django-TastyPie. Everything went smoothly: "until we got to this:
urls.py applications
url(r'^upload/', Resource(UploadHandler, authentication=KeyAuthentication()), name="api-upload"), url(r'^result/(?P<uuid>[^//]+)/', Resource(ResultsHandler, authentication=KeyAuthentication()), name="api-result")
This uses a piston, so we want to change it to something for tastyPie
url(r'^upload/', include(upload_handler.urls), name="api-upload"), url(r'^result/(?P<uuid>[^//]+)/', include(results_handler.urls), name="api-result")
But we are stuck in this error
Reverse for 'api-result' with arguments '()' and keyword arguments '{' uuid ':' fbe7f421-b911-11e0-b721-001f5bf19720 '}' not found.
And debugging the result:
Using the URLconf defined in MelodyService.urls, Django tried these URL patterns in the following order:
^ melotranscript / ^ upload / ^ melotranscript / ^ result / (? P [^ //] +) / ^ (? Presultshandler) / $ [name = 'api_dispatch_list'] ^ melotranscript / ^ result / (? P [^ // ] +) / ^ (? Presultshandler) / schema / $ [name = 'api_get_schema'] ^ melotranscript / ^ result / (? P [^ //] +) / ^ (? Presultshandler) / set / (? P \ w [\ w /; -] *) / $ [name = 'api_get_multiple'] ^ melotranscript / ^ result / (? P [^ //] +) / ^ (? Presultshandler) / (? P \ w [\ w / -] *) / $ [name = 'api_dispatch_detail'] ^ melotranscript / ^ processed / (? P.) $ ^ Admin / DOC / ^ TOU / $ [name = 'TOU'] ^ $ [name = 'index'] ^ Admin / ^ Doc / (? P.) $ The current URL, melotranscript / result / fbe7f421-b911-11e0-b721-001f5bf19720 /, does not match any of them.
Anyone who knows the problem? This can be a really dumb / noobish question ...
Lennart-
source share