I am trying to capture the slug from a URL to search and find the
object with that slug. Here is my URLconf:
(r'^brewery/(\w+)', breweryDetail),
It works when there are no spaces in the slug, but nothing comes up
when there are. There are no errors just no results showing up.
Here is my v
bumping this, I'm still at a loss...
On Jun 5, 1:28 pm, joelklabo wrote:
> I am trying to capture the slug from a URL to search and find the
> object with that slug. Here is my URLconf:
>
> (r'^brewery/(\w+)', breweryDetail),
>
> It works when there are no spaces in the slug, but nothing
The regex class "\w" doesn't include spaces, so maybe you need
(r'^brewery/([\w ]+). Then again spaces in urls are represented as
"%20", so maybe you need (r'^brewery/([\w%]+), can't be bothered to
test right now. Or maybe I'm totally wrong.
James
On Jun 7, 3:05 am, joelklabo wrote:
> bumping th
or, if there's nothing that comes beneath brewery, just (r'^brewery/(.
+)
On Jun 7, 3:17 am, James Gregory wrote:
> The regex class "\w" doesn't include spaces, so maybe you need
> (r'^brewery/([\w ]+). Then again spaces in urls are represented as
> "%20", so maybe you need (r'^brewery/([\w%]+),
Yes! Thank you! I just used the (.+) for now, it's working.
On Jun 6, 7:23 pm, James Gregory wrote:
> or, if there's nothing that comes beneath brewery, just (r'^brewery/(.
> +)
>
> On Jun 7, 3:17 am, James Gregory wrote:
>
>
>
> > The regex class "\w" doesn't include spaces, so maybe you need
>
5 matches
Mail list logo