Age | Commit message (Collapse) | Author |
|
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
This matches what we do on signoffs. Also beef up the styling a bit and
add the dynamically updated package count info.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
We can convert the entire search view to a generic class-based ListView.
This is still one of the more disgusting views in the application and
has a ton of logic scattered buckshot across several methods, but this
commit is not meant to address all of that in one go.
This is the last of the deprecated pieces I know of we are still using
in the codebase, so we should be relatively safe in the long run now for
an upgrade to the eventual next major Django release.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
We can use the class-based replacement instead.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
This was finally fixed upstream in
https://code.djangoproject.com/ticket/5350.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Now that Django actually provides a concise way to use a RequestContext
object without instantiating it, we can use that rather than the old
function-based generic view that worked well to do the same.
Additionally, these function-based generic views will be gone in Django
1.5, so might as well make the move now.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
This was around from the time when we handled timezones sanely and
Django did not; now that we are on 1.4 we no longer need our own code to
handle this.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
This matches the filtering options we have on the signoffs and package
differences pages.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
This is a field shown on the general_form.html, and shows up as
@@@INVALID@@@ in development environments.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
This is another thing that Google and other search engines try to crawl
that no longer exists at times, so we should handle it gracefully.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
We should handle the cases dealing with no filelist available, outdated
filelist, or a package without files, just as the HTML server-side page
does. Add a bit more info to the JSON returned so we can do so.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Now that we just generate this list in JS, we don't need this separate
code.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
This is a super-simple template to follow to make the filelists work, so
we can do all the "hard" work client-side. This also removes the need
for a header-dependent '/files/' URL, as we are now just using the JSON
representation instead.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
This allows us to do better than a generic 404 handler when we know a
package previously existed in a given repository, and should also make
things a bit nicer when getting sent in from a search engine to a page
that no longer exists.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
This moves a lot of the package and group display logic into a new view
module, similar to what we already did earlier with a bunch of other
views.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
This was seen in Google webmaster tools.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
And use it everywhere we were including the file before. This should
make updating the version a heck of a lot easier.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
This was a dumb oversight on my part in commit 0f3c894e7a0.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Also add 'env/', a directory I frequently use for the virtualenv.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Given the 999 SQL statement variable limit, we can easily hit it when
updating a package with thousands of files or a few hundred depends.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
It isn't worth it, as we run into the 999 max SQL statement variables
issue when using it on any significant amount of mirrors. Since this is
just a development database setup, and it isn't a command we need to run
especially fast, we can ditch it.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
At least on Linux, we hit a huge bottleneck waiting for the FULL commit
to happen for each added package during reporead operations. It makes
much more sense to back this off to FULL level instead, which trades
some possible loss of durability for speedier operation. Additionally,
no one would possibly be running their production version of this site
on sqlite3, right?
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Thank you database engines for all implementing such simple operations
as substring() and length() in different ways.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Because this function isn't shipped by default, it makes more sense to
just omit it completely from the query we do to build the tables on this
page when in development. Substitute 0.0 for the value so the rest of
the calculations and display work as expected.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
This adds a helper method to find the database engine in use, and then
skips code we shouldn't execute if we are doing this another way.
Note that this helper method could be useful for backend-specific code
paths elsewhere, such as custom SQL being called or lack of StdDev() in
sqlite3 out of the box.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
This will be done instead of doing this logic at the application level,
which has some subtle race conditions. When two simultaneous threads
attempt to delete the same package, two update rows for the delete
action are inserted. When done at the database level, we can ensure a
one-to-one mapping between row operations and entries in this table.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Managed to see this bubble up today when running the mirrorcheck command
on a less than ideal connection that was experiencing timeouts at the
wrong time.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
If we have duplicates in this list, it makes no sense to include them in
the list we send to the database.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
For now, this happens when the lists are over 20 items. Using JS, hide
the 21st and following packages listed in the list and replace them with
a 'Show More...' link that users can click to get the full list.
For a package such as glibc with 444 'Required By' entries, this can
make quite a visual difference.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Add the slash only if we have a directory name, and not otherwise.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
We should assume the filelists are up to date in this case, not out of
date.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
From FS#29922, indicate what happens if the package is unmaintained.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
These models regularly sort by or limit by the created field, so adding
a index on the created database column makes sense.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
This adds a Manager and log_update method to help log all updates made
to the packages table during reporead runs.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
This will be used to track updates to package as we do them during
reporead. By storing enough relevant fields from the package object, we
should be able to produce a useful report on a regular basis of what has
been happening in the repositories.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Since commit 158be107e4ad6, we have been importing the Package model at
the top-level in this file, so we can kill this code that was never
updated. This should also give us back any performance hit we were
seeing from the delayed imports.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
A behind the scenes field that might be slightly useful.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Otherwise there are too many grouped under each value.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
We were actually using the postdate attribute rather than last_modified,
which means any News objects that get edited would not trigger an update
of the feed.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
These were available only from the home page, but it makes sense to
advertise them on the corresponding index pages too.
Signed-off-by: Dan McGee <dan@archlinux.org>
|