Age | Commit message (Collapse) | Author |
|
If we pull this out and define it at the top level once, we save the
interpreter a fair amount of work.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
On the download page, the explicit sorted() call was forcing evaluation
of the Django queryset, even if we never actually needed the results
because the template fragment was cached. Wrap it all in a callable
function which looks the same to the template, but saves us the cost of
evaluation every single page view.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
We now always look for this information at the URL level, not the mirror
level. This simplifies quite a bit of code in and around the mirror
views.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Bug #16519 in Django deprecates mimetype, so update our code
accordingly.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Commit 4c69911982 had an inadvertent side effect here; we need to
explicitly disable ordering for the annotate() to work correctly.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
This should prevent the need for monthly template updates from Pierre
and Thomas; best to just let them enter the data themselves and have it
show up on the website.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Rather than the old idiom of dict((k, v) for <> in <>).
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
This seems like a more appropriate place, and now the visualization is
done here anyway so we should move the data backing it.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
This doesn't prevent unauthenticated users from accessing the feeds, but
it should reduce clutter and confusion on the feeds index page for users
unlikely to need these feeds.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
* Import signatures for all known keys, not just active developers
* Ensure we are only showing and accounting for active developers on the
master keys page
* Add a new table showing signatures between developers
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
This will prevent [staging] packages from cluttering normal user's view
on the website, but allow us to still import everything from this
repository for developer use.
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>
|
|
* Add a migration to drop the old countries field.
* Update all templates/views/utility methods to point at the new country
field and dereference it as necessary.
* Add the flags images to a few views where it makes sense.
* Cleanup the download page layout quite a bit.
* Bump the mirror status JSON version to 3; add country_code attribute.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
We're going to move to using ISO 2 character codes via django countries,
so start by moving the old data out of the way first.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
This shows the cross-product of each master key with each developer key
so you can see who has been signed, where signatures are missing, etc.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
This really just makes me look bad, but an interesting fact none the
less for people to look at.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
If a user was in both Developer and TU groups, they would show up twice.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Remove never_cache from many places now that we don't actually need it
since we aren't caching by default. Adjust our cache_function decorator
times be shorter values, and also randomize them a bit to make cache
invalidations not all line up.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Now that we aren't using the middleware, add cache headers on our
primary pages so we can prevent some repeat traffic, and cache all feeds
for five minutes.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
This adds the repo name, 'staging', and 'testing' as appropriate to a
classes field on the package updates object. This means we don't have to
update the CSS stylesheet to include hardcoded names of repositories
(e.g., 'kde-unstable').
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
This moves our site static files into the sitestatic directory if they
are shared resources, and also moves a handful of things (such as the
artwork logos) into application-specific static/ directories. This
allows the staticfiles contrib app to work after a few settings tweaks,
a run of collectstatic, and massaging the hardcoded '/media/' prefix out
of our templates.
Django 1.4 is going to make this a lot easier to move things to a CDN
and provides better template tags; for now this is setting the stage
before we can move to that.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
And a bunch of text that may suck, but is better than nothing.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Add a 'latin_name' field to the user profile so we can better support
those developers with names in non-Latin scripts, and yet still show a
Latin name as necessary on the developer profile page. This field only
shows up if populated.
Also, use consistent sorting everywhere- rather than using username,
always use first_name and last_name fields.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Dan: use relative links if possible, use releng link from settings, fix
HTML closing tags.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Pull out a few helpful objects and functions for use later elsewhere.
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>
|
|
I was getting sick of seeing the *-i18n packages completely blow away
anything else useful out of the recent updates sidebar. Revamp the logic
here again to do something about it. As we did before, grab packages
from the database and attempt to group them, but this time do it by only
repo and pkgbase.
From there, if we have packages in the group with a pkgname matching
pkgbase, we will link just those. If not, we will create some stub
objects that link to our relatively new virtual package overview screen.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Instead of having the '15 most recent' bit hardcoded, specify it as the
default but allow value to be overridden by any caller. We don't make
use of this yet, but it is not hard to do.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Don't use dotted notation now that we have less-than implemented methods
on the respective objects (which also allows this code to work under
PyPy). Switch a lambda call to use attrgetter as well.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
We had this set up as a unique ForeignKey before, which adds some
indirection due to the RelatedManager object being there. By making it a
OneToOneField, we can get the profile object directly, enforce uniqueness,
and also use it in select_related() calls to make our profiles page a bit
more efficient.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Made obvious when poking around with the Django debug toolbar.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Never would have guessed it should actually be in news/models.py.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
South actually makes this relatively painless if you get everything right,
so might as well start getting these out of the legacy main application to
eventually eliminate models being separate from their views.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Saves the hassle of needing to wrap everything in RequestContext()
manually.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
We had a bunch of extra imports, non-conventional variable names, spacing
issues, etc. that were relatively low-hanging fruit to clean up. Fix them
and make the code a bit cleaner in the process.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Get this working by doing some class business with CSS in order to highlight
the correct tab. I had to add some stuff to a variety of pages but it should
be working correctly now. Addresses FS#19591.
Signed-off-by: Dan McGee <dan@archlinux.org>
|
|
Rather than our home-baked roles field, which is free text so we really
shouldn't be checking against anyway. It also prevents people from being
both a developer and a TU.
Signed-off-by: Dan McGee <dan@archlinux.org>
|