Re: APPEND_SLASH skip per URL or per base_uri

2014-03-19 Thread Shai Berger
On Friday 14 March 2014 17:07:41 Val Neekman wrote: > Hi Aymeric, > > Localized solution is fine, but when I saw the number posts from people who > were trying to find a solution to this, I thought, perhaps it would be a > nice little enhancement to the APPEND_SLASH functionality. > https://gith

Re: APPEND_SLASH skip per URL or per base_uri

2014-03-14 Thread Ryan Hiebert
On Fri, Mar 14, 2014 at 10:07 AM, Val Neekman wrote: > > Localized solution is fine, but when I saw the number posts from people > who were trying to find a solution to this, I thought, perhaps it would be > a nice little enhancement to the APPEND_SLASH functionality. > You don't need to avoid A

Re: APPEND_SLASH skip per URL or per base_uri

2014-03-14 Thread Val Neekman
Hi Aymeric, Localized solution is fine, but when I saw the number posts from people who were trying to find a solution to this, I thought, perhaps it would be a nice little enhancement to the APPEND_SLASH functionality. Thanks, Val On Thursday, 13 March 2014 17:12:51 UTC-4, Val Neekman wrote

Re: APPEND_SLASH skip per URL or per base_uri

2014-03-13 Thread Val Neekman
Yep, $ is required. On Thu, Mar 13, 2014 at 5:21 PM, Ryan Hiebert wrote: > Sorry, auto-send. > > In your example, APPEND_SLASH wouldn't add a slash, because the URL in the > URLConf doesn't have a slash on it. > > I figure you probably meant this, though: > > url(r'^profile$', views.profile, na

Re: APPEND_SLASH skip per URL or per base_uri

2014-03-13 Thread Ryan Hiebert
Sorry, auto-send. In your example, APPEND_SLASH wouldn't add a slash, because the URL in the URLConf doesn't have a slash on it. I figure you probably meant this, though: url(r'^profile$', views.profile, name='profile', append_slash=False), (with a dollar sign at the end of the regex pattern).

Re: APPEND_SLASH skip per URL or per base_uri

2014-03-13 Thread Ryan Hiebert
In your example, APPEND_SLASH On Thu, Mar 13, 2014 at 4:12 PM, Val Neekman wrote: > Some JavaScript frameworks(e.g. AngularJS) remove the ending slash before > making a request. > If APPEND_SLASH = True, then the API would not be consumable by AngurlarJS. > > Would it be a good idea to add opti

Re: APPEND_SLASH skip per URL or per base_uri

2014-03-13 Thread Aymeric Augustin
On 13 mars 2014, at 22:12, Val Neekman wrote: > Would it be a good idea to add options to disable the APPEND_SLASH behaviour > per url(), or per a base_uri? > url(r'^profile', views.profile, name='profile', append_slash=False), Hi Val, In my opinion this is too specific. The logic for APPEND_S

APPEND_SLASH skip per URL or per base_uri

2014-03-13 Thread Val Neekman
Some JavaScript frameworks(e.g. AngularJS) remove the ending slash before making a request. If APPEND_SLASH = True, then the API would not be consumable by AngurlarJS. Would it be a good idea to add options to disable the APPEND_SLASH behaviour per *url()*, or per a *base_uri*? *Example 1:* *se