tirsdag 12. september 2017 22.19.52 UTC+2 skrev [email protected]
følgende:
>
> If you add something like "url("^search/$", mysearch, name="search")" in
> the main urls.py of your app above "url("^", include("mezzanine.urls")),"
> it should work. I just tried it and it addressed my custom "mysearch"
> perfectly.
>
That works because you’re using the same URL pattern as Mezzanine. If
you change it to `("^mysearch/$", search, name="search")`, where
`search` is Mezzanine’s search view, reverse lookup will still give
you Mezzanine’s URL since it’s defined later.
I’m wondering whether there is a better way to override it than:
url("^(?!mysearch/)", include("mezzanine.urls")),
url("^mysearch/$", search, name="search"),
-- Simen
--
You received this message because you are subscribed to the Google Groups
"Mezzanine Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.