summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2012-12-28Reduce query count when retrieving satisfiers and providersDan McGee
Django doesn't attach the parent object to the child objects, even when queried through the related manager. This causes up to 3 extra queries: one to retrieve the package again, and one each for arch and repo retrieval. For a package like archboot, this drops the number of necessary queries for the package page from 805 to 222 (yes, this is still too high) and cuts the time spent waiting on the database from 505ms to 262ms. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-12-28Set slug on todolist creationDan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2012-12-28Move slug creation helper to main/utilsDan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2012-12-28Use todolist slugs for all URLsDan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2012-12-28Populate the todolist slug field and mark non-nullDan McGee
This is ripped off from commit 7c92ddbd3c86d when we added slugs to News objects. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-12-28Add todolists slug fieldDan McGee
This will be used to make more descriptive URLs for our todolists. The `null=True` bit will be removed once a data migration is added to add slugs to all previously created todolists. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-12-28Remove old todo list modelsDan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2012-12-28Todolist URLs map to old_id now, not idDan McGee
This is a short-term fix before adding a slug field to todo lists as we did to news a while back. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-12-28Convert to using new todolist models everywhereDan McGee
This is a rather widespread set of changes converting usage to the new todo list and todo list package model recently introduced. The data migration is not included in this commit. After this commit, the old model should no longer be referenced anywhere. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-12-28Add data migration for todolistsDan McGee
This moves the data from the old models into the new ones. Note that IDs are not preserved across the move, but we do store the old ID in the old_id column so we don't break every link out there. Links will become slugs in a future commit, so there should be no ambiguity when linking via number vs string. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-12-28Add packages method to new Todolist modelDan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2012-12-28Add todolist admin for new modelDan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2012-12-28Add new todolists and todolist package modelDan McGee
Move the todolist model from main to the todolists application, and make a few minor tweaks to field names along the way. Also add a 'raw' field that will hold the originally input text data from the creator or last modifier of the todolist. Add pkgname, pkgbase, arch, and repo fields to a new todolist package model, which will supplement the former foreign key to an actual package object. This will prevent todolist package objects from ever being deleted as they can be now, which is not intuitive. Also change the current boolean 'complete' flag to a 'status' enum that can hold other values. For now, we add 'In-progress' to the mix. Finally, add a 'user' field, and a 'comments' field that will be utilized later by the UI. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-12-28Move the body of set_last_modified to main/utilsDan McGee
Instead of having multiple methods, move this into our single 'created' setter method. If the 'last_modified' property is present, we now update it accordingly when saving any model with this signal attached. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-12-28Allow pkg_details_link to return link title if package is missingDan McGee
For todolist packages that have had their package removed, this will allow the package name to continue to appear even after the linked package has been deleted. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-12-28Make attach_maintainers null-safeDan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2012-12-28Make link to mirror overview list publicDan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2012-12-28Remove sort icon graphicsDan McGee
As of commit 724422850020f, these are specified as data URLs directly in the CSS. They were kept around for a short time for caching reasons; by the time this commit gets deployed we should be fine. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-12-27Fix master key signing total countsDan McGee
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-27Ensure cascades in padding CSS happen correctlyDan McGee
Some of the base CSS styles were a bit too specific, causing certain overrides to not take effect. Loosen the specifications a bit so styles are easier to override. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-12-27Bump psycopg2 requirements versionrelease_2012-12-27Dan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2012-12-27Add initial todolists models migrationDan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2012-12-27Add a __unicode__ method for RecentUpdateDan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2012-12-27Add some more tests for ALPM API stuffDan McGee
These are super-simple, but it is also trivial to test. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-12-27Fix "RuntimeWarning: DateTimeField received a naive datetime" warningsDan McGee
When running tests, we can find old migrations that didn't use datetime objects with timezones attached. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-12-27Update D3 to 3.0.0Dan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2012-12-27Ensure mirror protocols are distinctDan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2012-12-27Tablesorter JS upgradeDan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2012-12-18Allow data in developer biographies to wrapDan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2012-12-11Fix FS#32018, provides links always go to [testing] packagesDan McGee
Remove some of the smarts and do less, but be better about properly sorting the items as one might expect. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-12-11Collapse really long signoff specifications using JSDan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2012-12-11Update jQuery to 1.8.3Dan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2012-12-11Use multiple separate document.ready() handlersDan McGee
If one of them breaks, we don't want to prevent the rest of the on-load events from firing. This is currently a problem on some browsers with the versions of jQuery and tablesorter we are using. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-12-11Bump Django version in requirementsDan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2012-12-04get_latest_by cleanupsDan McGee
Fix some that referenced non-existent attributes, and add the attribute to other models. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-12-04Add charset to meta tagsDan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2012-11-28Add safe_mode filter to news admin; preview uses safe modeDan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2012-11-27Don't cache package properties as aggressivelyDan McGee
For package signatures, it turns out it is way cheaper to just parse the signature again rather than going though all the decorator and cache_function_key business. This speeds up the mismatched signatures report significantly once this is removed. For base_package, given that we only call it once from our package details template, it makes little sense to cache the result. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-11-21Fix new magnet link generationrelease_2012-11-20Dan McGee
Apparently clients don't like urlencoded values in the magnet link, so %3A isn't treated the same as ':'. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-11-20Bump django-countries requirementDan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2012-11-21Fix mirror URL duplication in status viewDan McGee
We need to ensure we don't duplicate URLs in the status view, so add a distinct() call back in to the queryset when it was inadvertently dropped in commit a2cfa7edbb. This negates a lot of the performance gains we had, unfortunately, so it looks like a nested subquery might be more efficient. Disappointing the planner can't do this for us. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-11-21Minor download template tweaksDan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2012-11-21Show release notes on downloads pageDan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2012-11-20Move some logic out of the templates to the Release modelDan McGee
This includes magnet URI generation, ISO paths, etc. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-11-20Add Release model to relengDan McGee
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-20Improve performance of todolists queryDan McGee
Use some standard SQL and split the query into two different parts to save a lot of unnecessary sorting and field retrieval at the database level. The `CASE WHEN complete THEN 1 ELSE 0 END` syntax should be accepted by any database that implements proper SQL; it was tested in PostgreSQL and sqlite3 without issues. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-11-16Use python set comprehension syntax supported in 2.7Dan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2012-11-16Use Python 2.7 dictionary comprehension syntaxDan McGee
Rather than the old idiom of dict((k, v) for <> in <>). Signed-off-by: Dan McGee <dan@archlinux.org>
2012-11-16Bump several virtualenv requirementsDan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2012-11-16Optimize mirror status data fetchingDan McGee
Now that we have as many mirror URLs as we do, we can do a better job fetching and aggregating this data. The prior method resulted in a rather unwieldy query being pushed down to the database with a horrendously long GROUP BY clause. Instead of trying to group by everything at once so we can retrieve mirror URL info at the same time, separate the two queries- one for getting URL performance data, one for the qualitative data. The impetus behind fixing this is the PostgreSQL slow query log in production; this currently shows up the most of any queries we run in the system. Signed-off-by: Dan McGee <dan@archlinux.org>