Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

/python_books/ doesn't return 404 as mentioned in Chap 6 > Parameterised URL Mapping section #47

Closed
ProProgrammer opened this issue Dec 24, 2016 · 2 comments

Comments

@ProProgrammer
Copy link

Chapter 6 > Parameterized URL mapping section mentions that

if the URL was rango/category/python_books/ or rango/category/££££-$$$$$/ then the sequence of characters between rango/category/ and the trailing / would not match the regular expression, and a 404 not found error would result

(This line is just before info section titled Regex Hell)

This is not true in the case of path rango/category/python_books/. Accessing this page returns HTML with test "The specified category does not exist" instead of 404. It looks like the underscores are matched by regex \w as per what is mentioned on Regular-Expressions.info

\w stands for "word character". It always matches the ASCII characters [A-Za-z0-9_]. Notice the inclusion of the underscore...

@maxwelld90
Copy link
Collaborator

Hi @ProProgrammer, thanks for this. I'll have a look into this and see what I need to revise. Cheers!

@maxwelld90
Copy link
Collaborator

Hi @ProProgrammer, thanks for this. I am updating the book, and took out the first example -- which does not yield a 404 as you say. Thank you for the spot!

Cheers,
David

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants