corepost icon indicating copy to clipboard operation
corepost copied to clipboard

Examples in tutorial raised "URL 'xxxx' not found" error.

Open mission-liao opened this issue 11 years ago • 0 comments

I follow this tutorial http://jacek99.github.io/corepost/doc/build/html/url_routing.html and got stucked with "URL not found" error.

Finally I figure out what's wrong. If I replace this line:

app = RESTResource((RESTService,))

with

app = RESTResource((RESTService(),))

then thins going well, and this is because corepost.routing.RequestRouter.regisgerRouters looking for methods in "class.dict__" but not in "dict", which means if we pass a class-object but not an instance, this function "__regusterRouters" would find nothing.

Suggest to refine this tutorial or if I misunderstand anything, please feel free to let me know.

mission-liao avatar Jul 16 '13 10:07 mission-liao