$ in a regular expression means "match the end of the line." What this
means is that the first one, ^polls/$, means "match any url that starts
and ends with polls/". If you omit the $, it means "match any url that
starts with polls/, but ends with anything". So in your second example,
the first regexp will always match, and nothing will ever make it to the
second one.

Regards,
-scott

On Mon, 2006-06-05 at 19:26 -0700, John M wrote:
> Ok, so im gong through the turtorial and trying to adopt it to my own
> project, and I see this  in urlpatterns:
> 
> (r`^polls/$'....),
> (r'^polls/(\d+)/$'....)
> 
> how does that differ from
> 
> (r'^polls/'....),
> (r'^polls/(\d+)/$'....)
> 
> Note the $ is missing from the first line of the second example.
> 
> When you don't have a $  in the polls/ setup, it doesn't scan down to
> the other entries.
> 
> Since I'm so new to python and web stuff, was wondering if anyone could
> explain this.
> 
> Sorry for such a noob question.
> 
> Thanks
> 
> John
> 
> 
> > 


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to