diff options
author | Luke Shumaker <lukeshu@sbcglobal.net> | 2015-04-13 21:08:45 -0400 |
---|---|---|
committer | Luke Shumaker <lukeshu@sbcglobal.net> | 2015-04-13 21:08:45 -0400 |
commit | c6eb3b7b3c77d1b70126e0755c9ee66de88d5395 (patch) | |
tree | 138b206e95b7ec98ad9d319dd95157a2028b4cd1 /mirrors/views.py | |
parent | 81a4f3e5e602d900ebfb2c20eb7565fddfb013a2 (diff) | |
parent | c910b9220c45eb9d493d260f325efda2141205a4 (diff) |
Merge branch 'archweb-generic' into master-nomake
# Conflicts:
# public/views.py
Diffstat (limited to 'mirrors/views.py')
-rw-r--r-- | mirrors/views.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/mirrors/views.py b/mirrors/views.py index 26b5b802..55c40c4d 100644 --- a/mirrors/views.py +++ b/mirrors/views.py @@ -6,6 +6,7 @@ from operator import attrgetter, itemgetter from django import forms from django.forms.widgets import CheckboxSelectMultiple from django.core.serializers.json import DjangoJSONEncoder +from django.db import connection from django.db.models import Q from django.http import Http404, HttpResponse from django.shortcuts import get_object_or_404, redirect, render @@ -222,7 +223,9 @@ def url_details(request, name, url_id): def status_last_modified(request, *args, **kwargs): - return MirrorLog.objects.values_list('check_time', flat=True).latest() + cursor = connection.cursor() + cursor.execute("SELECT MAX(check_time) FROM mirrors_mirrorlog") + return cursor.fetchone()[0] @condition(last_modified_func=status_last_modified) |