summaryrefslogtreecommitdiffstats
path: root/public
AgeCommit message (Collapse)AuthorFilesLines
2019-02-01remove unecessary list callsAleksandar Trifunovic1-1/+1
2019-01-21request.user.is_authenticated() -> request.user.is_authenticatedAleksandar Trifunovic1-2/+2
2019-01-21main: run 2to3Jelle van der Waa1-1/+1
2018-04-08public/views: pgp_key is not a foreign relation, so cannot be select_relatedJohannes Löthberg1-4/+2
Wonder how old this bug is.. Signed-off-by: Johannes Löthberg <johannes@kyriasis.com>
2017-07-11public.views: remove unused import/variableJelle van der Waa1-2/+0
2017-07-11public.utils: remove unused variable archJelle van der Waa1-1/+1
2017-06-29Fix RemovedInDjango19WarningDaniel Hahler1-2/+2
> Passing callable arguments to queryset is deprecated.
2017-06-12urls.py: remove legacy urlsJelle van der Waa1-8/+0
The legacy urls where introduced in 2011 get rid of them since it's 2017.
2017-06-11tests: add tests for sitemapsJelle van der Waa1-0/+7
2017-06-11public: test missing urlsJelle van der Waa1-0/+18
Test the urls which are part of public but where not tested yet due to missing fixtures.
2016-06-03Add information and ipxe images for the new netboot systemThomas Bächler1-2/+0
2015-04-15Fix error in test where HTTP_HOST doesn't existDan McGee1-1/+1
Signed-off-by: Dan McGee <dan@archlinux.org>
2015-04-15Shore up some failing testsDan McGee1-4/+4
We really need to add a bunch of new ones for views that have been added and/or changed, such as all the people stuff, but fix the response code here to reflect the new and current reality. Signed-off-by: Dan McGee <dan@archlinux.org>
2015-04-13Add JSON-LD search engine configurationDan McGee1-0/+2
Implemented as documented here: http://googlewebmastercentral.blogspot.com/2014/09/improved-sitelinks-search-box.html Signed-off-by: Dan McGee <dan@archlinux.org>
2014-12-17Fix thinko in leaving old code behind in keys_jsonDan McGee1-2/+0
Signed-off-by: Dan McGee <dan@archlinux.org>
2014-11-07Master signing keys page improvementsDan McGee1-15/+22
* Don't show non-packagers * Don't hardcode group names in view code * Reduce number of database queries for all of the cross-signature developer name lookups Signed-off-by: Dan McGee <dan@archlinux.org>
2014-11-02Add new StaffGroup objectrelease_2014-11-02Dan McGee1-35/+8
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>
2014-10-19Use varied prime numbers for caching lengthsDan McGee1-7/+7
Signed-off-by: Dan McGee <dan@archlinux.org>
2014-09-11Remove now unnecessary empty models.py filesDan McGee1-1/+0
Signed-off-by: Dan McGee <dan@archlinux.org>
2013-12-14Fix some caching issues on the front pageDan McGee2-5/+6
The return value from get_recent_updates() was too big for memcached due to all the attached objects, so the cache never actually worked. This sucks, because we ended up doing all the work in this function and most of the time we didn't use it because template fragment caching kicked in. Remove the cache_function decorator from this method, and instead implement delayed calling of the function so we don't compute values we aren't going to use. Template fragment caching will help us in most cases. Signed-off-by: Dan McGee <dan@archlinux.org>
2013-09-30Proper support for revoked signaturesDan McGee1-4/+4
The 'valid' column wasn't quite right. Add a new 'revoked' column that works similar to the one we have on keys and use it instead, properly parsing the output from `gpg` signature data and looking for the magic prefix string. Signed-off-by: Dan McGee <dan@archlinux.org>
2013-06-01Ensure only active mirror URLs are listedDan McGee1-1/+1
This fixes things up on the download page as well as the individual mirror details page. Signed-off-by: Dan McGee <dan@archlinux.org>
2013-04-16Various minor code cleanups and fixesrelease_2013-04-16Dan McGee1-1/+0
Most of these were suggested by PyCharm, and include everything from little syntax issues and other bad smells to dead or bad code. Signed-off-by: Dan McGee <dan@archlinux.org>
2013-03-11Don't link to a one-element listing page from recent updatesDan McGee1-3/+8
If a package is built as a split package where pkgname != pkgbase, but only one actual split package is produced, the link on the recent update screen requires an extra click to get to the single package. Fix this by linking directly to the package itself. (Examples in current repos: ntfs-3g, python2-south) Signed-off-by: Dan McGee <dan@archlinux.org>
2013-02-03Run pngcrush and optipng over most static contentDan McGee25-0/+0
The programs have improved a bit and found some room for optimization, especially in the static logo content. Some files were reduced in size by 50% or more. Signed-off-by: Dan McGee <dan@archlinux.org>
2013-01-19Don't redefine mirror_url function every callDan McGee1-10/+11
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>
2013-01-18Don't pull and sort mirror URLs unless we have toDan McGee1-5/+10
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>
2013-01-14Drop country column from mirror tableDan McGee1-1/+1
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>
2013-01-13Use content_type and not mimetype on HttpResponse()Dan McGee1-1/+1
Bug #16519 in Django deprecates mimetype, so update our code accordingly. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-12-27Fix master key signing total countsDan McGee1-1/+1
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>
2012-12-27Add a __unicode__ method for RecentUpdateDan McGee1-0/+4
Signed-off-by: Dan McGee <dan@archlinux.org>
2012-11-20Add Release model to relengDan McGee1-0/+6
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>
2012-11-16Use Python 2.7 dictionary comprehension syntaxDan McGee1-1/+1
Rather than the old idiom of dict((k, v) for <> in <>). Signed-off-by: Dan McGee <dan@archlinux.org>
2012-11-13Move JSON keys view to public/ appDan McGee1-2/+51
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>
2012-09-25Only show staging feeds to logged-in usersDan McGee1-1/+4
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>
2012-09-25Add structured data to developer listing pagesDan McGee1-0/+3
Signed-off-by: Dan McGee <dan@archlinux.org>
2012-07-31PGP key handling updatesDan McGee1-5/+13
* 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>
2012-07-31Update several bits and pieces for staging packagesDan McGee2-4/+13
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>
2012-07-24Replace deprecated direct_to_template() with render() shortcutDan McGee1-7/+7
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>
2012-04-25Finish django countries implementationDan McGee1-10/+8
* 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>
2012-04-25Rename mirror country fields to country_old in prep for normalizationDan McGee1-1/+1
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>
2012-03-29Add developer status table to master keys pageDan McGee1-3/+18
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>
2012-03-21Add number of keys signed to master keys pageDan McGee1-3/+12
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>
2012-03-09Ensure users only show up once on the Fellows pageDan McGee1-0/+1
If a user was in both Developer and TU groups, they would show up twice. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-01-05Adjust page and content caching lengths and decoratorsDan McGee1-1/+1
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>
2012-01-03Add a few cache headers and minor feed caching back inDan McGee1-0/+7
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>
2011-12-11PyLint suggested cleanupsDan McGee1-1/+1
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-12-09Add CSS classes to front page package update objectsDan McGee1-0/+7
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>
2011-12-05Convert to and enable staticfiles contrib applicationDan McGee39-0/+2967
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>
2011-12-05download: add a link to the new netboot environmentThomas Bächler1-0/+1
Signed-off-by: Dan McGee <dan@archlinux.org>