CottageLabs / idfind

An identifier identifier
1 stars 0 forks source link

/identify and /identifier #17

Open emanuil-tolev opened 12 years ago

emanuil-tolev commented 12 years ago

/identify should attempt to identify an identifier.

If you submit from the form on the main page, it works (i.e. POST-ing works).

However, if you just do /identify/identifier , it doesn't do anything. The routing's slightly wrong with a missing '/', and the web.identify code has to be changed to actually make use of the GET data, the URL.

/identifier isn't actually coded as a route (the web.identifier function itself looks incomplete AND the routing /identifier is commented out). However, /identify is redirecting to /identifier. I don't quite get how that works at all actually.

emanuil-tolev commented 12 years ago

http://localhost:5001/identify/a will work.

But http://localhost:5001/identify/10.1186/1758-2946-3-42 (a DOI) won't work. I checked with print statements - it doesn't route to the identify method.

Most probably because of the forward slashes - the route is defined as "/identify" and "/identify/" but it's getting confused.

A POST (submit from the homepage) works because it encapsulates the data differently than a GET request. Somebody with more Flask mojo than me?

emanuil-tolev commented 12 years ago

"However, if you just do /identify/identifier , it doesn't do anything." has been fixed in commit ea82aed. This issue is still open though, because the /identifier routing in web.py needs to be looked at.

At this point all it should do is the same as the /identify routing, so maybe I'll just add it as an alternative routing to the web.py identify function.