fixed regex in urls and redirects in results.py + timeline.py

This commit is contained in:
Austin Clark 2015-07-16 12:33:12 -06:00
parent 819d2d7f12
commit 0e145f0927
4 changed files with 3 additions and 7 deletions

View File

@ -1,4 +0,0 @@
from django.views.generic import TemplateView
class LatestResultsView(TemplateView):
template_name = 'devstack/latest_results.html'

View File

@ -16,7 +16,7 @@ class ResultsView(TemplateView):
class LatestResultsView(RedirectView):
def get_redirect_url(self, run_id):
def get_redirect_url(self):
repos = get_repositories()
if not repos:
raise Http404("No testr repositories could be loaded")

View File

@ -16,7 +16,7 @@ class TimelineView(TemplateView):
class TimelineLatestView(RedirectView):
def get_redirect_url(self, run_id):
def get_redirect_url(self):
repos = get_repositories()
if not repos:
raise Http404("No testr repositories could be loaded")

View File

@ -12,7 +12,7 @@ urlpatterns = patterns('',
url(r'^results/(?P<run_id>\d+)/$',
ResultsView.as_view(),
name='tempest_results'),
url(r'^latest_results$',
url(r'^results/$',
LatestResultsView.as_view(),
name='tempest_results_latest'),