Found the problem. I had defined `redirect` as `'/'` far up in the code and 
forgot about it. That's why Python thought `redirect()` was a string.

On Wednesday, November 22, 2017 at 8:59:06 PM UTC-5, Tom Tanner wrote:
>
> In one of my views, I have this:
>
> from mezzanine.utils.urls import home_slug
>
> def myView(request):
>   # Some code...
>   return redirect(home_slug())
>   
>
> This gives me the error: `TypeError: 'str' object is not callable`. Am I 
> supposed to use `home_slug()` to redirect to home page in this case? If 
> not, how else do I redirect to the home page? I have not touched/edited the 
> urlpattern for the default home page in `urls.py`.
>

-- 
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.

Reply via email to