I am currently defining regular expressions in order to capture parameters in a URL, as described in the tutorial. How do I access parameters from the URL as part the
I would like to share a tip that may save you some time.
If you plan to use something like this in your urls.py
file:
url(r'^(?P\w+)/$', views.profile_page,),
Which basically means www.example.com/
. Be sure to place it at the end of your URL entries, because otherwise, it is prone to cause conflicts with the URL entries that follow below, i.e. accessing one of them will give you the nice error: User matching query does not exist.
I've just experienced it myself; hope it helps!