# HG changeset patch # User Sverre Rabbelier # Date 1232645174 0 # Node ID a6397daf4006d86027532cbadee77e9bea1bc88b # Parent 7110fc489fd00be5330f5a2ba61608ea79f9376e Hide the 'link_id' field for site Also construct the scope_path from the fields in case the entity has not yet been created. Patch by: Sverre Rabbelier diff -r 7110fc489fd0 -r a6397daf4006 app/soc/views/models/presence.py --- a/app/soc/views/models/presence.py Thu Jan 22 17:23:17 2009 +0000 +++ b/app/soc/views/models/presence.py Thu Jan 22 17:26:14 2009 +0000 @@ -116,7 +116,8 @@ """See base.View._editPost(). """ - scope_path = entity.key().name() + key_fields = self._logic.getKeyFieldsFromDict(fields) + scope_path = self._logic.getKeyNameForFields(key_fields) home_link_id = fields['home_link_id'] # TODO notify the user if home_doc is not found diff -r 7110fc489fd0 -r a6397daf4006 app/soc/views/models/site.py --- a/app/soc/views/models/site.py Thu Jan 22 17:23:17 2009 +0000 +++ b/app/soc/views/models/site.py Thu Jan 22 17:26:14 2009 +0000 @@ -64,6 +64,11 @@ new_params['public_template'] = 'soc/home/public.html' + new_params['create_extra_dynafields'] = { + 'link_id': forms.CharField(widget=forms.HiddenInput, required=True), + } + new_params['edit_dynafields'] = [] + patterns = [] page_name = "Home Page"