On 11/1/07, cjl <[EMAIL PROTECTED]> wrote:
>
> Do I need it if Django is already appending slashes?
>

No.

Writing regular expressions is obviously something that can be done
different ways.  I think you should write your URLconfs expecting the
slashes to be there so that you let Django append it and therefore
have a single URL format.  This gives you a little more coherence when
people link to you, and also helps with search ranking a little.

If you have APPEND_SLASH = False and wish to accept either form, then
you need to have the ? after the final "/" in order to match either
form.

The answer to what that last "?" did, though, is answered in the re
syntax guide which Tim posted.
( http://docs.python.org/lib/re-syntax.html )
Quoting:
"
"?"
    Causes the resulting RE to match 0 or 1 repetitions of the
preceding RE. ab? will match either 'a' or 'ab'.
"

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
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