Re: Optional trailing slashes in Routers

2018-04-13 Thread Xavier Ordoquy
The solution proposed on SO looks sensible to me.
I think the optional trailing slash is a bad idea because you won’t have a 
unique identifier for representation any longer.

Regards,
Xavier Ordoquy,
Linovia;

> Le 13 avr. 2018 à 11:39, German Prostakov  a écrit :
> 
> Is it possible to do without such workaround suggested on SO: 
> https://stackoverflow.com/questions/46163838/how-can-i-make-a-trailing-slash-optional-on-a-django-rest-framework-simplerouter?
> Is it planned to allow optional trailing space in Routers? I think I'm not 
> the only one who thinks this is a lack of convenience, especially if you 
> switch your backend to Django and you had optional trailing slashes in routes 
> in previous backend framework (Express.js)
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Django REST framework" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to django-rest-framework+unsubscr...@googlegroups.com 
> .
> For more options, visit https://groups.google.com/d/optout 
> .

-- 
You received this message because you are subscribed to the Google Groups 
"Django REST framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-rest-framework+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Optional trailing slashes in Routers

2018-04-13 Thread Carlton Gibson
Hi German, 

> On 13 Apr 2018, at 11:39, German Prostakov  > wrote:
> 
> ...without such workaround…

Given how simple the workaround is, I’d bet on “No” as to including such in DRF 
itself. (It’s just not worth the code and tests etc.) 

Maybe a PR on the docs with the example would be worthwhile. 

Kind Regards,

Carlton


-- 
You received this message because you are subscribed to the Google Groups 
"Django REST framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-rest-framework+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.