I can appreciate the need for this setting (among other things, it might make migrating URLs from systems where this is more standard (e.g., Drupal) simpler), but I wouldn't go so far as to talk about an "illusion".
Unless we're proposing to remove all slashes from all URLs--which is certainly possible with our URL system--there's always going to be some hint of that, but I think the slashes represent a hierarchy more than they do a directory structure. Sure, directories were a big influence on why the slashes ended up there in the first place, but I don't think anyone is sufficiently taken by this "illusion" that they think there's actually a file called "2b6a459329fe498a" in a folder called "thread" when they read this discussion... -Justin On Jun 14, 12:53 am, "M. N. Islam Shihan" <mnis4...@gmail.com> wrote: > +1 > > I also like the remove_slash version of urls over the append_slash > version as the trailing slash creates a directory structure illusion > which is not true. > > Cheers > Shihan > > On Jun 14, 2009, at 11:12 AM, donquixote <klabaut...@googlemail.com> > wrote: > > > > > Ok, I know similar questions have been asked about the trailing slash > > before. See > >http://groups.google.com/group/django-developers/browse_thread/thread... > > > My proposal is a little different: > > - I agree there should be only one url for each page. Any alias urls > > should be redirected. > > - I think that trailing slashes look ugly, and should be avoided for > > good style. > > > Nice (i): > >http://mysite.org/members/emil > >http://mysite.org/members/emil/contact > > > Not nice (ii): > >http://mysite.org/members/emil/ > >http://mysite.org/members/emil/contact/ > > > Even worse (iii): > >http://mysite.org/members/emil//////////// > > etc > > > Or worst (iv): > >http://mysite.org////members////emil//////////// > > > So, ideally I want the (ii) and (iii) and (iv) type of urls (with more > > slashes than needed) redirected to the first type of urls (with no > > trailing slash, and no duplicate slashes). For the duplicates I don't > > care that much, most important is the case (ii) with one trailing > > slash. > > > And this is how I imagine this to work: > > - In addition to the existing option of append_slash, we get one more > > option, which is remove_slash. > > - With the setting enabled, for any given url there will be two > > versions computed: One reduced version without duplicates and without > > trailing slash, and one version without duplicates but with one > > trailing slash appended. > > - The dispatcher will give both versions a try. > > - If the original url had a trailing or duplicate slash, and no other > > redirect directive has been triggered, the request will be redirected > > to the reduced version. > > - If the original url was "clean", django can now execute the action > > determined by the dispatcher. > > > I think this will be more useful than the append_slash mechanic. > > > Thanks! > > donquixote --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@googlegroups.com To unsubscribe from this group, send email to django-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-developers?hl=en -~----------~----~----~----~------~----~------~--~---