summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2013-01-14Ensure URLs without check data work on mirror details pageDan McGee1-7/+11
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 McGee12-36/+93
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 McGee1-0/+74
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-14Use content_type and not mimetype on HttpResponse()Dan McGee8-15/+14
Bug #16519 in Django deprecates mimetype, so update our code accordingly. Signed-off-by: Dan McGee <dan@archlinux.org>
2013-01-14Add __name__ attribute to class-based Feeds viewsDan McGee1-0/+4
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-14Disable XView MiddlewareDan McGee1-1/+0
This is the default now in Django anyway: https://code.djangoproject.com/ticket/7317 Signed-off-by: Dan McGee <dan@archlinux.org>
2013-01-14Load key before importing newrelicDan McGee2-5/+7
Their code stupidly grabs the environment variable during import, not during the initialize call. Signed-off-by: Dan McGee <dan@archlinux.org>
2013-01-14Try 3 at getting the New Relic license key inDan McGee1-5/+5
Signed-off-by: Dan McGee <dan@archlinux.org>
2013-01-14More tweaks for New Relic in WSGI scriptDan McGee1-1/+6
Signed-off-by: Dan McGee <dan@archlinux.org>
2013-01-14Add newrelic.ini fileDan McGee1-0/+194
Signed-off-by: Dan McGee <dan@archlinux.org>
2013-01-14Enable newrelic in WSGI if availableDan McGee1-2/+19
Signed-off-by: Dan McGee <dan@archlinux.org>
2013-01-14Simplify the WSGI scriptDan McGee1-2/+1
Signed-off-by: Dan McGee <dan@archlinux.org>
2013-01-14Add current production archweb.wsgi scriptDan McGee1-0/+15
Signed-off-by: Dan McGee <dan@archlinux.org>
2013-01-12Make packages JSON search more performantDan McGee1-2/+6
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 McGee3-1/+253
Signed-off-by: Dan McGee <dan@archlinux.org>
2013-01-12Round two of mirror status query improvementsDan McGee1-9/+10
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 McGee1-0/+7
Signed-off-by: Dan McGee <dan@archlinux.org>
2013-01-12Add mirror status page to base sitemapDan McGee1-0/+1
Signed-off-by: Dan McGee <dan@archlinux.org>
2012-12-31Fix case of devel user profile verbose nameDan McGee1-2/+2
Signed-off-by: Dan McGee <dan@archlinux.org>
2012-12-31Set user on todolist packages when flag status changesDan McGee1-0/+1
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 McGee4-23/+38
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 McGee1-1/+1
Signed-off-by: Dan McGee <dan@archlinux.org>
2012-12-31Fix dependency issue found by south migrationcheck commandDan McGee1-0/+1
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 McGee3-3/+5
Signed-off-by: Dan McGee <dan@archlinux.org>
2012-12-31Add 'created' field to packages modelDan McGee3-2/+123
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 McGee2-1/+128
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>
2012-12-31Minor news admin code cleanupDan McGee1-0/+4
Signed-off-by: Dan McGee <dan@archlinux.org>
2012-12-31Small admin tweaks for todolists filteringDan McGee1-0/+1
Signed-off-by: Dan McGee <dan@archlinux.org>
2012-12-31Remove old todolist permissionsDan McGee1-50/+0
Signed-off-by: Dan McGee <dan@archlinux.org>
2012-12-31Update the groups JSON fixtureDan McGee1-70/+159
Signed-off-by: Dan McGee <dan@archlinux.org>
2012-12-31Fix todolist permission typoDan McGee1-1/+1
Signed-off-by: Dan McGee <dan@archlinux.org>
2012-12-31Minor updates to READMEDan McGee1-4/+4
Signed-off-by: Dan McGee <dan@archlinux.org>
2012-12-31Remove several context processors we don't useDan McGee1-3/+0
We're not using any of the injected values these context processors provide in our templates, so remove them from our default config. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-12-30Move needs_autoescape attribute to @register.filterDan McGee1-2/+2
This is the preferred and non-deprecated way of doing this in Django 1.4+. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-12-30Enable clickjacking protection via middlewareDan McGee1-0/+4
See https://docs.djangoproject.com/en/1.4/ref/clickjacking/ for details. This middleware was added to the default configuration in Django 1.4. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-12-29Defer the 'raw' field when listing todolistsDan McGee2-2/+2
A lot like skipping fetching of the news content; we definitely don't need this just to list the todolists on index pages. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-12-28Retrieve arch and repo too when calling reverse_conflictsDan McGee1-1/+1
Since we need these in the template for any details links, we might as well pull them back from the database in one query rather than three. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-12-28Add a todolist package details link template tagDan McGee5-5/+25
Given the way we retrieve certain related objects, it makes more sense to use a custom tag here rather than our generic package details link tag. When viewing a large todolist, this saves significantly on the number of queries we need to build the page. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-12-28Reduce query count when retrieving satisfiers and providersDan McGee2-10/+14
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 McGee1-2/+6
Signed-off-by: Dan McGee <dan@archlinux.org>
2012-12-28Move slug creation helper to main/utilsDan McGee2-16/+17
Signed-off-by: Dan McGee <dan@archlinux.org>
2012-12-28Use todolist slugs for all URLsDan McGee4-28/+45
Signed-off-by: Dan McGee <dan@archlinux.org>
2012-12-28Populate the todolist slug field and mark non-nullDan McGee4-3/+255
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 McGee2-0/+124
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 McGee3-70/+134
Signed-off-by: Dan McGee <dan@archlinux.org>
2012-12-28Todolist URLs map to old_id now, not idDan McGee2-5/+5
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 McGee11-90/+97
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 McGee1-0/+183
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 McGee1-0/+6
Signed-off-by: Dan McGee <dan@archlinux.org>
2012-12-28Add todolist admin for new modelDan McGee1-0/+14
Signed-off-by: Dan McGee <dan@archlinux.org>