summaryrefslogtreecommitdiffstats
path: root/apps/patchwork/filters.py
Commit message (Collapse)AuthorAgeFilesLines
* Move to a more recent django project structureJeremy Kerr2015-05-271-471/+0
| | | | | | | | | | 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>
* Resolve removed 'AUTH_PROFILE_MODULE' settingStephen Finucane2015-05-031-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The 'AUTH_PROFILE_MODULE' setting, and the 'get_profile()' method on the 'User' model are removed in Django 1.7. This causes errors when using Patchwork with Django 1.7+. There are three changes necessary: * Replace profile model's 'ForeignKey' with a 'OneToOneField' * Remove all 'get_profile()' calls * Delete 'AUTH_PROFILE_MODULE' settings from 'settings.py' These changes are discussed here: http://deathofagremmie.com/2014/05/24/retiring-get-profile-and-auth-profile-module/ Django 1.6 also introduces two other notable changes: * The 'XViewMiddleware' module has been moved * A new test runner has been introduced It is not possible to fix these issues without breaking compatibility with Django 1.5. As a result they have been ignored and must be resolved in a future release. Signed-off-by: Stephen Finucane <stephenfinucane@hotmail.com> Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* filters: fix exception in filter querystring generationJeremy Kerr2014-06-031-1/+2
| | | | | | | | | | | We get a silent (as it's during template render) exception when generating filter querystrings, as we're passing a list to the string format operator rather than a tuple. This change removes the map and explicitly applies sanitise to the (name, value) pair. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* filters: handle utf-8 characters when building filter querystringJeremy Kerr2011-12-081-2/+8
| | | | | | | | | | | | | Currently, we build the filter querystring by passing the raw string to urllib.quote, which expects an encoded string. When the raw string (in this case, a unicode object) contains a unicode character, quote() raises a KeyError. This fixes the problem by encoding the parameter name and values to UTF-8 first. Reported-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* filters: quote param names and values when constructing querystringsJeremy Kerr2011-03-081-1/+3
| | | | | | | | | | Use urllib.quote to sanitise parameter names and values; prevents escaped ampersands in the input qs from appearing unescaped in the link output. Add a testcase for the unescaped qs fragments Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* Fix mishandling of existing querystring parametersJeremy Kerr2008-09-121-1/+1
| | | | | | | Currently, we only get the first character of order= parameters in the 'remove this filter' querystring. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* Remember state filter settingsJeremy Kerr2008-09-121-2/+12
| | | | | | We need to set a few 'selected' options.. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* Don't apply delegate = Nobody filter by defaultJeremy Kerr2008-09-121-18/+11
| | | | Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* Make state = Action Required a default filterJeremy Kerr2008-09-121-22/+22
| | | | Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* Add 'Action Required' meta-state filterJeremy Kerr2008-09-121-2/+28
| | | | | | This filter shows all patches in states with action_required = True. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* In some places tabs are used instead of spaces for indentation,Nate Case2008-08-231-24/+24
| | | | | | | | | | | even when other lines of a method are indented with spaces. This gets rid of all tabs and uses spaces everywhere. [Reworked to apply on newer code by Jeremy] Signed-off-by: Nate Case <ncase@xes-inc.com> Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* Inital commitJeremy Kerr2008-08-211-0/+433
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>