diff options
authorDan McGee <>2010-08-27 17:31:40 -0500
committerDan McGee <>2010-08-27 17:32:52 -0500
commit971e9faf906d686e05b641f497ba37ee605d4a47 (patch)
parente595665abd8700afc6474f08bef95eea3c986260 (diff)
Add package groups to front page and cache resultsrelease_2010-08-27-2
Make it more visible to the public, and cache the results of the group information function since it was designed and made separate for that purpose and the results can safely be reused without needing to worry too much about it being stale. Signed-off-by: Dan McGee <>
2 files changed, 4 insertions, 1 deletions
diff --git a/packages/ b/packages/
index ae31f150..20fdb393 100644
--- a/packages/
+++ b/packages/
@@ -20,7 +20,7 @@ import string
from main.models import Package, PackageFile
from main.models import Arch, Repo, Signoff
from main.models import MirrorUrl
-from main.utils import make_choice
+from main.utils import cache_function, make_choice
from packages.models import PackageGroup, PackageRelation
def opensearch(request):
@@ -85,6 +85,7 @@ def details(request, name='', repo='', arch=''):
return HttpResponseRedirect("/packages/?arch=%s&repo=%s&q=%s" % (
arch.lower(), repo.title(), name))
def get_group_information():
raw_groups = PackageGroup.objects.values_list(
'name', 'pkg__arch__name').order_by('name').annotate(
diff --git a/templates/public/index.html b/templates/public/index.html
index eb58e8db..c86a9768 100644
--- a/templates/public/index.html
+++ b/templates/public/index.html
@@ -139,6 +139,8 @@
title="Get a custom mirrorlist from our database">Mirrorlist Updater</a></li>
<li><a href="/packages/"
title="View/search the package repository database">Packages</a></li>
+ <li><a href="/groups/"
+ title="View the available package groups">Package Groups</a></li>
<li><a href=""
title="Report/track bugs or make feature requests">Bug Tracker</a></li>
<li><a href="{% url page-svn %}"