Changed document to also filter on the prefix when getting the documents for a scope.
authorLennard de Rijk <ljvderijk@gmail.com>
Wed, 11 Feb 2009 20:02:46 +0000
changeset 1262 e2e5b7798746
parent 1261 95b858816568
child 1263 34d3f7c756a1
Changed document to also filter on the prefix when getting the documents for a scope. For this to work the organization prefix is now org. Patch by: Lennard de Rijk Reviewed by: to-be-reviewed
app/soc/models/document.py
app/soc/views/models/document.py
--- a/app/soc/models/document.py	Wed Feb 11 19:59:27 2009 +0000
+++ b/app/soc/models/document.py	Wed Feb 11 20:02:46 2009 +0000
@@ -48,7 +48,7 @@
 
   #: field storing the prefix of this document
   prefix = db.StringProperty(default='user', required=True,
-      choices=['site', 'club', 'sponsor', 'program', 'organization', 'user'],
+      choices=['site', 'club', 'sponsor', 'program', 'org', 'user'],
       verbose_name=ugettext('Prefix'))
   prefix.help_text = ugettext(
       'Indicates the prefix of the document,'
--- a/app/soc/views/models/document.py	Wed Feb 11 19:59:27 2009 +0000
+++ b/app/soc/views/models/document.py	Wed Feb 11 20:02:46 2009 +0000
@@ -146,6 +146,7 @@
     """
 
     filter = {
+        'prefix' : params['url_name'],
         'scope_path': entity.key().name(),
         'is_featured': True,
         }