# HG changeset patch # User Sverre Rabbelier # Date 1235176439 0 # Node ID 6c94a1531eadb3795e731c509f3f031dbd446771 # Parent d34768bf62d8c684399cdb1275f2edd3a02d69d9 Add an home_for reference property This field will be set to whatever presence is using the document as home document. Patch by: Sverre Rabbelier diff -r d34768bf62d8 -r 6c94a1531ead app/soc/models/document.py --- a/app/soc/models/document.py Sat Feb 21 00:30:53 2009 +0000 +++ b/app/soc/models/document.py Sat Feb 21 00:33:59 2009 +0000 @@ -26,6 +26,7 @@ from django.utils.translation import ugettext +import soc.models.linkable import soc.models.work @@ -79,3 +80,10 @@ is_featured.help_text = ugettext( 'Field used to indicate if a Work should be featured, for example,' ' in the sidebar menu.') + + #: Reference to Document containing the contents of the "/home" page + home_for = db.ReferenceProperty( + reference_class=soc.models.linkable.Linkable, + collection_name='home_docs') + home_for.help_text = ugettext( + 'The Precense this document is the home document for.') diff -r d34768bf62d8 -r 6c94a1531ead app/soc/views/models/document.py --- a/app/soc/views/models/document.py Sat Feb 21 00:30:53 2009 +0000 +++ b/app/soc/views/models/document.py Sat Feb 21 00:33:59 2009 +0000 @@ -96,7 +96,7 @@ 'clean_scope_path': cleaning.clean_scope_path('scope_path'), 'clean': cleaning.validate_document_acl(self), } - new_params['extra_dynaexclude'] = ['author', 'created', + new_params['extra_dynaexclude'] = ['author', 'created', 'home_for', 'modified_by', 'modified'] new_params['edit_extra_dynafields'] = {