> Id rather not go to:
> r'/albums/(?P<album_id>\d+)/$' and keep the more readable urls....

You can still use this format and get readable urls:
r'albums/(?P<album_dir>)/$'

The album_dir is simply a parameter that is passed to your view
function. If you set your regex up you can limit it/adjust it to allow
for certain characters, etc.

If you know you are looking at a particular format, though, I would use
that as much as possible - it safer and easier to debug:
r'albums/(?P<year>[\d]{4})/(?P<month>[^/]+)/(?P<album_name>[^/]+)/$'

Then in your method you would have:
def view_album(request, year, month, album_name)

 -rob

Reply via email to