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

Fixed unit tests, added support for potential repeating partials caus… #3

Merged
merged 4 commits into from
Jun 15, 2017

Conversation

zarrigoni
Copy link
Contributor

…ing url part repretition

Added support for the case when the same partial root is in the redirects table:

Example:
Entry 1:

from_url                                                             
/sears-tower---willis-tower-parking
to_url 
/chicago/sears-tower-willis-tower-parking

Entry 2

from_url                                                             
/chicago/sears-tower---willis-tower-parking
to_url 
/chicago/sears-tower-willis-tower-parking

A request to /chicago/sears-tower---willis-tower-parking would redirect to /chicago/chicago/sears-tower---willis-tower-parking

@zarrigoni
Copy link
Contributor Author

@emperorcezar
What are the instructions for getting the next version of this correctly released?

Q(from_url__iexact=no_leading_slash_path) | Q(from_url__iexact=leading_slash_path),
status=1,
site=current_site)
site=current_site).first()

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We'll want to order_by('-pk') to get the latest

@zarrigoni zarrigoni merged commit 2545540 into master Jun 15, 2017
@chillpop chillpop deleted the partial-redirect-fix branch February 11, 2019 17:42
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

Successfully merging this pull request may close these issues.

3 participants