summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2013-01-19Add a view to download the torrent available for a given releaseDan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2013-01-19Mark release version string as uniqueDan McGee
It should be unique anyway, but it is especially important now that we are using it in URL patterns for lookup. Signed-off-by: Dan McGee <dan@archlinux.org>
2013-01-19Implement torrent data parsing and extraction via bencodeDan McGee
This allows uploading of the actual torrent file itself into the webapp and then pulling the relevant pieces of information out of it. Signed-off-by: Dan McGee <dan@archlinux.org>
2013-01-19Add basic release list and details viewsDan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2013-01-19Add more metadata to releng Release modelDan McGee
Add a file_size field which we will use in the RSS feed, and also add a field for future storage of the torrent data itself. Signed-off-by: Dan McGee <dan@archlinux.org>
2013-01-19Don't redefine mirror_url function every callDan McGee
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-19Publicize the releases feedDan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2013-01-19Initial cut of a Releases RSS feedDan McGee
This is our first use of enclosures on the site as well. Signed-off-by: Dan McGee <dan@archlinux.org>
2013-01-19Add double click event handler to hide imageDan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2013-01-18Use a set instead of list when gathering package differencesDan McGee
If we implement the __eq__ and __hash__ methods, we can use a set to gather package difference objects and make deduplication of objects a lot more efficient. Signed-off-by: Dan McGee <dan@archlinux.org>
2013-01-18Include 'files_last_update' in package sitemap queryDan McGee
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>
2013-01-18Don't pull and sort mirror URLs unless we have toDan McGee
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-16Convert all usages of flag icons to new spriterelease_2013-01-18Dan McGee
This uses a new template tag to avoid repeating construction of the necessary HTML element all over the place. The site should look exactly as it did before, except now you don't have to download 20+ images to see some pages. Signed-off-by: Dan McGee <dan@archlinux.org>
2013-01-16Remove debugging print statementDan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2013-01-16Rename famfamfam flags sprite PNG and CSSDan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2013-01-16More famfamfam flags style tweakingDan McGee
* Point default image at a blank spot in the PNG. * Remove dead style. * Don't use any crazy prefix matching stuff; just have separate class for default view. Signed-off-by: Dan McGee <dan@archlinux.org>
2013-01-16Simplify famfamfam flags CSSDan McGee
Remove any redundant width and height declarations from individual countries and shorten the CSS class names. Signed-off-by: Dan McGee <dan@archlinux.org>
2013-01-16Add famfamfam flags sprite image and CSSDan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2013-01-15Add a little easter egg for people to findDan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2013-01-15Tabs -> spaces in archweb.cssDan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2013-01-15Clean up and make several migrations modernrelease_2013-01-15Dan McGee
This moves most migrations to the v2 format that have been presenting some issues. One missing depends_on relationship has been added, and we allow an index to not be dropped if it does not exist due to the shittyness in sqlite3 actually keeping indexes across DDL on that table. Signed-off-by: Dan McGee <dan@archlinux.org>
2013-01-15Add new AlwaysCommitMiddleware to the stackDan McGee
The reason for this is documented in the middleware itself. Without this, pgbouncer is of little use to us since it has to throw away every connection we try to route through it because of unclean disconnects. In theory, with the switch to using pgbouncer for all WSGI originating connections and adding this middleware, we should see a notable decrease in connection time to the database. Signed-off-by: Dan McGee <dan@archlinux.org>
2013-01-15Handle connection and transaction more properly in reporeadDan McGee
A few minor things are fixed here. One is PostgreSQL, and more specifically pgbouncer, don't like it when the connection is closed after psycopg2 has started an implicit transaction even for read-only queries. Ensure we call commit as our last database action in all cases. The other is related- Django in management commands doesn't ever call close on any database connection you may have been using, so PostgreSQL gets mad about this fact and logs a message saying such. Close the connection explicitly when we are done with it to play nice. Signed-off-by: Dan McGee <dan@archlinux.org>
2013-01-14Support mirror status JSON by tierDan McGee
Just as we do for the normal status HTML view. Signed-off-by: Dan McGee <dan@archlinux.org>
2013-01-14Ensure URLs without check data work on mirror details pageDan McGee
Less noticeable in production as the templates don't show '@@@INVALID@@@' there, but we were trying to access attributes that don't actually exist on certain mirror objects. Signed-off-by: Dan McGee <dan@archlinux.org>
2013-01-14Drop country column from mirror tableDan McGee
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-14Add migration to move country data down to the URL levelDan McGee
Rather than have the weird indirection we need now to find the right country for URLs, just always store it on the URL. Signed-off-by: Dan McGee <dan@archlinux.org>
2013-01-13Use content_type and not mimetype on HttpResponse()Dan McGee
Bug #16519 in Django deprecates mimetype, so update our code accordingly. Signed-off-by: Dan McGee <dan@archlinux.org>
2013-01-13Add __name__ attribute to class-based Feeds viewsrelease_2013-01-13Dan McGee
This should hopefully allow these views to not be labeled as '_wrapped_view' in performance monitoring output. Signed-off-by: Dan McGee <dan@archlinux.org>
2013-01-13Disable XView MiddlewareDan McGee
This is the default now in Django anyway: https://code.djangoproject.com/ticket/7317 Signed-off-by: Dan McGee <dan@archlinux.org>
2013-01-13Load key before importing newrelicDan McGee
Their code stupidly grabs the environment variable during import, not during the initialize call. Signed-off-by: Dan McGee <dan@archlinux.org>
2013-01-13Try 3 at getting the New Relic license key inDan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2013-01-13More tweaks for New Relic in WSGI scriptDan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2013-01-13Add newrelic.ini fileDan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2013-01-13Enable newrelic in WSGI if availableDan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2013-01-13Simplify the WSGI scriptDan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2013-01-13Add current production archweb.wsgi scriptDan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2013-01-12Make packages JSON search more performantrelease_2013-01-12Dan McGee
We were peppering the database with a bunch of queries here; using prefetch_related and attach_maintainers can cut down the count significantly. Signed-off-by: Dan McGee <dan@archlinux.org>
2013-01-12Add last_modified field to todolist packagesDan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2013-01-12Round two of mirror status query improvementsDan McGee
This seems to generate much more performant queries at the database level than what we were previously doing, and also doesn't show duplicate rows. Signed-off-by: Dan McGee <dan@archlinux.org>
2013-01-12Add get_associated_packages method to FlagRequestDan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2013-01-12Add mirror status page to base sitemapDan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2012-12-31Fix case of devel user profile verbose namerelease_2012-12-31Dan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2012-12-31Set user on todolist packages when flag status changesDan McGee
This will allow us to see who last changed the status of a todolist item. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-12-31Mark todolist packages as removed rather than deleting themDan McGee
This makes it easier to see the progression of a todolist and its contents easier since we are no longer losing the data. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-12-31Fix list_pkgbases view callDan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2012-12-31Fix dependency issue found by south migrationcheck commandDan McGee
Due to pgp_signature being added to the Package model, we need to depend on this later change as well. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-12-31Minor coding style tweaksDan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2012-12-31Add 'created' field to packages modelDan McGee
This will be used to eventually implement the UI side of FS#13441, but to do that, we first need the data. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-12-31Add 'removed' field to todolist packagesDan McGee
This will be utilized to soft-delete items from the list if the packages are modified, rather than deleting them outright. Signed-off-by: Dan McGee <dan@archlinux.org>