[Answer]-Django url matching non characters and charaters

1👍

The issue might be your regex. The URL example you’re showing has a space in it. \w won’t match spaces. Try this instead: r'^delete_group/([\w\s]+)/ which allows either words or spaces in multiples.

However, know that spaces are not valid in URLs and will likely get converted to %20 or something similar. A best practice is to use hyphens where you would put a space.

I’d also point you at this answer to a similar question.

👤Kinsa

Leave a comment