equal
deleted
inserted
replaced
74 |
74 |
75 SUBMIT_MESSAGES = ( |
75 SUBMIT_MESSAGES = ( |
76 ugettext_lazy('Document saved.'), |
76 ugettext_lazy('Document saved.'), |
77 ) |
77 ) |
78 |
78 |
|
79 |
79 def getDocForForm(form): |
80 def getDocForForm(form): |
80 """Extracts doc fields from a form and creates a new doc from it |
81 """Extracts doc fields from a form and creates a new doc from it |
81 """ |
82 """ |
82 |
83 |
83 user = users.get_current_user() |
84 user = users.get_current_user() |
100 |
101 |
101 doc = soc.logic.document_logic.updateOrCreateFromFields(properties, |
102 doc = soc.logic.document_logic.updateOrCreateFromFields(properties, |
102 partial_path=partial_path, link_name=link_name) |
103 partial_path=partial_path, link_name=link_name) |
103 |
104 |
104 return doc |
105 return doc |
|
106 |
105 |
107 |
106 def edit(request, partial_path=None, link_name=None, |
108 def edit(request, partial_path=None, link_name=None, |
107 template=DEF_SITE_DOCS_EDIT_TMPL): |
109 template=DEF_SITE_DOCS_EDIT_TMPL): |
108 """View for a Developer to modify the properties of a Document Model entity. |
110 """View for a Developer to modify the properties of a Document Model entity. |
109 |
111 |