Sounds good, but I haven't fully understood the snippet (sory, I
haven't looked at django's middleware before). How would one "pick"
between appending or not appending slashes following this approach?

Meanwhile I made a few searches for the current behavior of the
APPEND_SLASH setting and found this thread:
http://groups.google.com/group/django-developers/browse_thread/thread/d6ca6e1442658598

It also suggests using an extra middleware, to append a slash only if
the URL in question doesn't exist without a slash. This would more
easily allow me to default to appended slashes while also being able
to use URLs without appended slashes in some situations, whenever it
makes more sense.
There are already some patches for it here:
http://code.djangoproject.com/ticket/3224
http://code.djangoproject.com/ticket/3228

thanks,
Filipe


On Mar 6, 8:05 pm, "sjzabel" <[EMAIL PROTECTED]> wrote:
> Totally pointless :P but it was a fun lunch 
> breakhttp://www.djangosnippets.org/snippets/86/
>
> Cheers,
> Stephen
>
> On Mar 6, 12:13 pm, "sjzabel" <[EMAIL PROTECTED]> wrote:
>
> > I agree with James^2
>
> > I do find the appended slash to be a little bit distracting when
> > referring to a single item. However, for practical purposes I use the
> > always append approach because I do feel that it is less ambiguous.
>
> > Is the slash on a single item distracting enough to warrant a
> > middleware or decorator that will allow you to pick? It is easy
> > enough, so I will probably add a snippet to James Bennett Django
> > snippets site.
>
> > Cheers,
> > Stephen
>
> > On Mar 6, 10:17 am, "James Stembridge" <[EMAIL PROTECTED]> wrote:
>
> > > Hi Filipe,
>
> > > On Mar 6, 2:53 pm, "Filipe Correia" <[EMAIL PROTECTED]> wrote:
>
> > > >http://somedomain.org/people/12
> > > >http://somedomain.org/people/12/belongings/
>
> > > If you think of the mapping of these URLs to files (I know there
> > > aren't actually any files involved, but it's a useful analogy) then
> > > what is "12"? To me it looks like a file in the first URL and a
> > > directory in the second.
>
> > > Personally I prefer the "always append a slash" approach as it seems
> > > less ambiguous.
>
> > > Hope that's at least vaguely useful,
> > > James.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to