summaryrefslogtreecommitdiffstats
path: root/patchwork/views/__init__.py
Commit message (Collapse)AuthorAgeFilesLines
* patchwork/views: request.REQUEST is deprecated in django 1.8Jeremy Kerr2015-06-051-4/+8
| | | | | | .. so do explicit accesses to request.GET or request.POST. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* patchwork/views: prefetch delegate in generic_listJeremy Kerr2015-06-051-1/+1
| | | | | | | | If patches have a delegate, the patch list template will cause a query to render the delegate username. Instead, we should include the delegate in the select_related query. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* Add patch tag infrastructureJeremy Kerr2015-05-281-0/+3
| | | | | | | | | | | | | | | | | | | | | This change add patch 'tags', eg 'Acked-by' / 'Reviewed-by', etc., to patchwork. Tag parsing is implemented in the patch parser's extract_tags function, which returns a Counter object of the tags in a comment. These are stored in the PatchTag (keyed to Tag) objects associated with each patch. We need to ensure that the main patch lists do not cause per-patch queries on the Patch.tags ManyToManyField (this would result in ~500 queries per page), so we introduce a new QuerySet (and Manager) for Patch, adding a with_tag_counts() method to populate the tag counts in a single query. As users may be migrating from previous patchwork versions (ie, with no tag counts in the database), we add a 'retag' management command. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* Move to a more recent django project structureJeremy Kerr2015-05-271-0/+220
This change updates patchwor to the newer project struture: we've moved the actual application out of the apps/ directory, and the patchwork-specific templates to under the patchwork application. This gives us the manage.py script in the top-level now. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>