Calls to order_by() without passing any parameters was causing
UnorderedObjectListWarning during unit tests. The failing unit tests
were testing the sitemap functionality. Sitemaps utilize Paginators,
which require either the entity ordering as specified in their Meta
object, or a specific ordering in the QuerySet, otherwise this warning
is issued.
This reverts commit 790def2f4d.
This has been out there long enough that the fallout should be fixed. Go
back to just using the default date.
Signed-off-by: Dan McGee <dan@archlinux.org>
We fixed the embarrassing '/usr/bin/None' bug here; force Google and
others to reindex these pages if possible by marking them as modified.
Signed-off-by: Dan McGee <dan@archlinux.org>
This will allow us to be a bit more dynamic in showing the people
listings on the website. We'll be adding a Support Staff category to
recognize those that do things around here but aren't technically
developers.
Signed-off-by: Dan McGee <dan@archlinux.org>
We didn't link this page from anywhere so it was hard to find. Also add
it to the sitemap so it gets indexed.
Signed-off-by: Dan McGee <dan@archlinux.org>
Adjust changefreq and priority based on the repository the package is
in. Testing and staging have quick turnover so set the changefreq to
'daily'. Additionally, give staging packages a super low priority of 0.1
and testing a slightly lowered priority of 0.4.
We didn't include staging packages before, but since search engines are
finding them anyway, we might as well. This gives us a chance to share
how important the page is as well, which they could only guess before.
Signed-off-by: Dan McGee <dan@archlinux.org>
We need this for the package files sitemap; else we are doing one query
per package to retrieve this field. Whoops.
Signed-off-by: Dan McGee <dan@archlinux.org>
* Select arch and repo related models as we need the name off each
* Only select the fields we actually need from the database
* Exclude [staging] packages
Signed-off-by: Dan McGee <dan@archlinux.org>
The output is not required to be ordered by the specification, so save
some effort by skipping any sorting.
Signed-off-by: Dan McGee <dan@archlinux.org>
This is most of the transition to Django 1.4 `USE_TZ = True`. We need to
ensure we don't mix aware and non-aware datetime objects when dealing
with datetimes in the code. Add a utc_now() helper method that we can
use most places, and ensure there is always a timezone attached when
necessary.
Signed-off-by: Dan McGee <dan@archlinux.org>
For those items less than one day old, mark change frequency as 'daily';
for those less than one week old, mark as 'weekly'. Finally, bump
everything else up from 'never' to 'yearly' to ensure it gets crawled at
least once in a while.
Signed-off-by: Dan McGee <dan@archlinux.org>
With very low priority, but this should at least give a few more
cross-linking pages to any crawlers using sitemaps.
Signed-off-by: Dan McGee <dan@archlinux.org>
For a Package object query, we almost always did .select_related('arch',
'repo). Refactor this into the manager as a 'normal()' method so we can
avoid sprinkling the same logic everywhere.
Signed-off-by: Dan McGee <dan@archlinux.org>
Split it up as it is growing rather large, and add all the package files
views to the mix so Google or anyone can pick those up. They get a slightly
lower priority (if that even matters).
Signed-off-by: Dan McGee <dan@archlinux.org>