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
--- 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,
}