Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

Another urlconf

  • Loading branch information...
commit fb49713cc6f7e0f4334137128efae11435f4bd14 1 parent 6f66efa
@mpdaugherty mpdaugherty authored
Showing with 5 additions and 5 deletions.
  1. +5 −5 chapter03.rst
10 chapter03.rst
@@ -595,11 +595,11 @@ A novice might think to code a separate view function for each hour offset,
which might result in a URLconf like this::
urlpatterns = patterns('',
- ('^time/$', current_datetime),
- ('^time/plus/1/$', one_hour_ahead),
- ('^time/plus/2/$', two_hours_ahead),
- ('^time/plus/3/$', three_hours_ahead),
- ('^time/plus/4/$', four_hours_ahead),
+ url(r'^time/$', current_datetime),
+ url(r'^time/plus/1/$', one_hour_ahead),
+ url(r'^time/plus/2/$', two_hours_ahead),
+ url(r'^time/plus/3/$', three_hours_ahead),
+ url(r'^time/plus/4/$', four_hours_ahead),
Clearly, this line of thought is flawed. Not only would this result in redundant

0 comments on commit fb49713

Please sign in to comment.
Something went wrong with that request. Please try again.