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

DEFAULT_404_REDIRECT not working аs conceived. #3

Open
rinaatt opened this issue Apr 4, 2017 · 0 comments
Open

DEFAULT_404_REDIRECT not working аs conceived. #3

rinaatt opened this issue Apr 4, 2017 · 0 comments

Comments

@rinaatt
Copy link

rinaatt commented Apr 4, 2017

In settings.py I see it

Optional setting to specify default redirection for 404 hits if no explicit redirect is provided

but in code vice versa that does matter have found redirect or not found. In any way will be redirect to default

        # if default 404 redirect is specified, do a temporary redirect
        if redirect_settings.DEFAULT_404_REDIRECT:
            return http.HttpResponseRedirect(redirect_settings.DEFAULT_404_REDIRECT)

        if redirect.redirect_to_url:
            response_class = self.get_response_class(redirect)
            return response_class(redirect.redirect_to_url)

In my opinion it blocks need swap the order.

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

1 participant