django-tastypie / django-tastypie

Creating delicious APIs for Django apps since 2010.
http://tastypieapi.org/
Other
3.92k stars 1.17k forks source link

Cannot use any special regex char (such as ".") `api_name` because it is ambiguously/incompatibly used as both string and regex. #816

Open kennknowles opened 11 years ago

kennknowles commented 11 years ago

There does not seem to be a consistent way to achieve an API named "v0.4".

From the way it is used right now, and because it hardly makes sense to match multiple names, I believe the intent is for it is be a plain string, so it should be passed through re.escape prior to putting it in the urlpatterns, here: https://github.com/toastdriven/django-tastypie/blob/master/tastypie/api.py#L103

Am I correct? Feedback?

Kenn

kennknowles commented 11 years ago

The precise link to the part of the commit relevant for this ticket is https://github.com/dimagi/core-hq/blob/master/corehq/apps/api/urls.py#L51