Skip to content
This repository has been archived by the owner on Apr 25, 2023. It is now read-only.

Commit

Permalink
Merge pull request #414 from OriHoch/change-parties-member-redirect-t…
Browse files Browse the repository at this point in the history
…o-temporary

make the parties-members redirect temporary,
  • Loading branch information
OriHoch committed Nov 9, 2015
2 parents 87bf2fc + 2798154 commit cfbb76f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
7 changes: 6 additions & 1 deletion auxiliary/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -471,6 +471,9 @@ def test_internal_links(self):

redirects = [
reverse('party-list'), reverse('member-list'),
]

temp_redirects = [
reverse('parties-members-index'),
]

Expand Down Expand Up @@ -504,7 +507,9 @@ def test_internal_links(self):
link = links_to_visit.pop()
res0 = self.client.get(link)

if link in redirects:
if link in temp_redirects:
self.assertEqual(res0.status_code, 302, msg="internal (temporary) redirect %s from page %s seems to be broken" % (link,page))
elif link in redirects:
self.assertEqual(res0.status_code, 301, msg="internal redirect %s from page %s seems to be broken" % (link,page))
else:
self.assertEqual(res0.status_code, 200, msg="internal link %s from page %s seems to be broken" % (link,page))
Expand Down
1 change: 1 addition & 0 deletions mks/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -831,6 +831,7 @@ def get_queryset(self):

class PartiesMembersRedirctView(RedirectView):
"Redirect old url to listing of current knesset"
permanent = False

def get_redirect_url(self):
knesset = Knesset.objects.current_knesset()
Expand Down

0 comments on commit cfbb76f

Please sign in to comment.