]> git.ozlabs.org Git - patchwork/commitdiff
Merge branch 'notifications'
authorJeremy Kerr <jk@ozlabs.org>
Mon, 19 Sep 2011 01:42:44 +0000 (09:42 +0800)
committerJeremy Kerr <jk@ozlabs.org>
Mon, 19 Sep 2011 01:42:44 +0000 (09:42 +0800)
apps/patchwork/utils.py
apps/patchwork/views/xmlrpc.py
apps/settings.py
docs/INSTALL

index 5cb45e8eeaa41191955ead4a9fea3ca434dbb81d..e7619c319091ce2dd9e78396f24ffbe8dac1f6db 100644 (file)
@@ -58,12 +58,12 @@ class Order(object):
     def __init__(self, str = None, editable = False):
         self.reversed = False
         self.editable = editable
+        (self.order, self.reversed) = self.default_order
 
         if self.editable:
             return
 
         if str is None or str == '':
-            (self.order, self.reversed) = self.default_order
             return
 
         reversed = False
@@ -72,7 +72,6 @@ class Order(object):
             reversed = True
 
         if str not in self.order_map.keys():
-            (self.order, self.reversed) = self.default_order
             return
 
         self.order = str
index bb9ebe15d82a9df37176d6fa42167db7efdb7073..283eb34be865fd129c5b1ddcd09328f3fa98e225 100644 (file)
@@ -328,7 +328,7 @@ def patch_list(filter={}):
         patches = Patch.objects.filter(**dfilter)
 
         if max_count > 0:
-            return map(patch_to_dict, patches)[:max_count]
+            return map(patch_to_dict, patches[:max_count])
         else:
             return map(patch_to_dict, patches)
 
index 4432f3f04d7cbdf953e21d70bc87ba5b78d3cfa4..7523099374cc09922008bc3cb3ddc3f81b101842 100644 (file)
@@ -10,12 +10,12 @@ ADMINS = (
 
 MANAGERS = ADMINS
 
-DATABASE_ENGINE = 'postgresql_psycopg2'           # 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'ado_mssql'.
-DATABASE_NAME = 'patchwork'             # Or path to database file if using sqlite3.
-DATABASE_USER = ''             # Not used with sqlite3.
-DATABASE_PASSWORD = ''         # Not used with sqlite3.
-DATABASE_HOST = ''             # Set to empty string for localhost. Not used with sqlite3.
-DATABASE_PORT = ''             # Set to empty string for default. Not used with sqlite3.
+DATABASES = {
+    'default': {
+        'ENGINE': 'django.db.backends.postgresql_psycopg2',
+        'NAME': 'patchwork',
+    },
+}
 
 # Local time zone for this installation. Choices can be found here:
 # http://www.postgresql.org/docs/8.1/static/datetime-keywords.html#DATETIME-TIMEZONE-SET-TABLE
index 050fc9f10a4cefcef22454967d2d234ee3326d30..c63d6f707e08690c38539a15247bd5a09ebb1df0 100644 (file)
@@ -3,13 +3,13 @@ Deploying Patchwork
 Patchwork uses the django framework - there is some background on deploying
 django applications here:
 
- http://www.djangobook.com/en/1.0/chapter20/
+ http://www.djangobook.com/en/2.0/chapter12/
 
 You'll need the following (applications used for patchwork development are
 in brackets):
 
   * A python interpreter
-  * django
+  * django >= 1.2
   * A webserver (apache)
   * mod_python or flup
   * A database server (postgresql)
@@ -73,7 +73,7 @@ in brackets):
         lib/packages is for stuff we'll download, lib/python is to add
         to our python path. We'll symlink python modules into lib/python.
 
-        At the time of release, patchwork depends on django version 1.0 or
+        At the time of release, patchwork depends on django version 1.2 or
         later. Your distro probably provides this. If not, do a:
 
          cd lib/packages