From f70291e8fb3c919f4abefe6b741ce6dbf6e44063 Mon Sep 17 00:00:00 2001 From: Nick Sergeant Date: Wed, 20 Jun 2012 11:26:27 -0400 Subject: [PATCH] Order and much more tags --- templates/sitemap.xml | 20 ++++++++++---------- views.py | 3 +-- 2 files changed, 11 insertions(+), 12 deletions(-) diff --git a/templates/sitemap.xml b/templates/sitemap.xml index 869a1cd..f3c084f 100644 --- a/templates/sitemap.xml +++ b/templates/sitemap.xml @@ -1,28 +1,28 @@ - - https://snipt.net/api/ + + https://snipt.net/api/ monthly 1.0 - - https://snipt.net/todo/ + + https://snipt.net/todo/ daily 1.0 - - https://snipt.net/public/ + + https://snipt.net/public/ always 1.0 - - https://blog.snipt.net/ + + https://blog.snipt.net/ weekly 1.0 {% for tag in tags %} - - https://snipt.net/public/tag/{{ tag.slug }} + + https://snipt.net/public/tag/{{ tag.slug }} 0.9 {% endfor %} diff --git a/views.py b/views.py index c4740b3..f1d3660 100644 --- a/views.py +++ b/views.py @@ -10,8 +10,7 @@ def sitemap(request): tags = Tag.objects.filter(snipt__public=True) tags = tags.annotate(count=Count('taggit_taggeditem_items__id')) - tags = tags.order_by('-count')[:50] - tags = sorted(tags, key=lambda tag: tag.name) + tags = tags.order_by('-count')[:1000] return render_to_response('sitemap.xml', {'tags': tags},