Age | Commit message (Collapse) | Author |
|
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
We had some dependency issues between migrations that needed to be
explicitly defined in order to get things fully moving, and do to some
braindeadness in Django tests not including the project url config, we need
to do some clever business when using the url tag in the base template so
tests don't doe with a NoReverseMatch exception.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Do it in our actual cache rather than an object-level, single request cache.
300 seconds is good enough resolution to have this data right; if it is
updated everyone will see the results 5 minutes late at the most.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
This allows caching the results of an arbitrary function and its arguments
in the Django-managed cache, e.g. memcached in production.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
This was having some serious effects on caching as we would always have to
access the user in the session, marking every page with a "Vary: Cookie"
header. This is the start of stamping that out. The way we get the user for
news item creation is now more similar to that from the todo lists, but not
quite. That should be adjusted to be more like the news item creation.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
We have added some repos and some fields to these guys, so update them with
what we have in production at the moment.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Add two methods to the package class, base_package() and split_packages(),
that allow us to grab other related packages to one we are interested in.
This allows us to list the Base Package on the package details page as a
link.
With the split_packages() method, we can also now list and link all
sub-packages on the package details page; e.g. for 'kernel26' we can now
link through to 'kernel26-firmware' and 'kernel26-headers'.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Instead of putting 'www.archlinux.org' all over the place, use the Django
sites framework to pull the site name out of the database. Now these
amazing things will work if you are running locally and decide to change the
site!
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Conflicts:
templates/public/download.html
|
|
Apparently Django 1.1.1 let null fields pass right through but this now
causes reporead to blow up in 1.1.2. Fix the issue and get things working
again by allowing nulls where it probably makes sense and including a
migration to fix the issue, which for the real database will be a no-op.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Also unify the sorting at the model-level for donors and remove the now
duplicate sorting in the admin for mirrors.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
This is to address a rather large issue with caching of feed objects in
Django. Because they are built up using an XML library that does multiple
writes on a file-like object, a single feed object, even when pulled from
memcached, generates 1582 writes to the open socket rather than the optimal
one it could do.
Some version of this fix will be making it upstream, but I need to figure
out how to approach that before I do so and for now this will address one of
our larger performance issues on the live site since the packages feed is
hit as often as it is.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Use distinct() on a query. Fixes FS#19195.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Add a link to the wiki instead. Also remove ExternalProject model and
associated dealings.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Add link to wiki instead. Also remove AltForum model and associated
dealings.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
A link to the wiki was already present, but the model and admin had not
been removed.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
So remove it from the select_related() call on todo lists.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
This allows some of our queries to get a lot simpler as well as removing the
pkgbase_safe property added earlier.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Now that we always populate it, this change will make it a lot easier to use
when relating to other tables, such as our maintainer relations.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
And also add a data migration to add the value retroactively for anything
already in our database. We simply fall back to pkgname if pkgbase isn't
available.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
This is an attempt to fix our long-standing problems dealing with maintainer
information. Move the actual maintainer information off of the package model
into a PackageRelation object, which has some flexibility to later represent
more than just maintainership.
This solves multiple problems:
* If a package gets accidentally deleted, so did the maintainer info
* Testing packages have always shown up as orphans
* With split packages, it was easy to miss some of the sub-packages
This commit does not include the deletion of the original maintainer column;
that will come at a later time when I feel more confident that the data was
migrated correctly.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
I think I bumbled this up a while back, but make sure they aren't required
and we use the empty string for all of those that don't provide a value.
Fixes FS#18763.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Since at least two repositories currently fall under this flag, add some
help text and visibility to this column.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
We were not handing depends of 'any' packages correctly if they depended on
arch-dependent packages; we labeled them all as virtual. If we have an 'any'
package, drop the arch screening and just pick one to link to.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
This will eventually lead into a cleanup where we don't do checks on the
repo name all over the place like we currently do.
There are two migrations involved here; one to add the column and one to
deduce the correct value from the existing names of the repos.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Rather than a short 255 character field.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
This wasn't strictly necessary and was more hassle than it was worth.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Allow this to be stored in the database for later use by an external
generation script for the rsyncd secrets file.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Add ability to track tier and upstream mirror in the database.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Conflicts:
templates/todolists/view.html
|
|
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
For now, this contains one new template tag- 'jquery'. This will allow us to
use the Google AJAX CDN in non-debug environments, since there is really no
need for us to be the source of this common file. In the future this package
may gain other static media resource tags as well.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
This is necessary to keep all of our junk in sync since we aren't guaranteed
to have an up to date files database all the time.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
We can capture the build date, compressed size, and installed size when
reporead runs. Even if we don't show all of it, we should pull it in.
FS#14270 is requesting that the package size be shown on the website.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Unnecessary, and lets us standardize on not using it everywhere.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
First off, the copyright notice is from the other middleware previously
removed, so all of that can go, along with some stragglers in the import
list.
Next, as stated on
http://code.djangoproject.com/wiki/CookBookThreadlocalsAndUser, you need to
be sure to have the import in the model class be the same as the import used
in the middleware declaration, which was not true. Whoops.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Why issue lots of UPDATE queries when you can only issue one? My fail.
Signed-off-by: Evangelos Foutras <foutrelis@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
It isn't the most elegant operation in the world, but attempt to only show
one line per package, grouping by architecture if multiple were updated in
the same go. This makes the recent packages view a bit more useful as a
heads up view. Implements FS#17304.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
This is, at least for me, more useful than the link to a specific
build of a package. We provide both so no one should lose here.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
We were doing a 2 queries for each 'Required By' entry- arch and repo as
usual. Add it to the original query so we don't waste time.
Noticed while looking at the glibc description page.
Signed-off-by: Dan McGee <dan@archlinux.org>
|