equal
deleted
inserted
replaced
99 properties['title'] = form.cleaned_data.get('title') |
99 properties['title'] = form.cleaned_data.get('title') |
100 properties['short_name'] = form.cleaned_data.get('short_name') |
100 properties['short_name'] = form.cleaned_data.get('short_name') |
101 properties['abstract'] = form.cleaned_data.get('abstract') |
101 properties['abstract'] = form.cleaned_data.get('abstract') |
102 properties['content'] = form.cleaned_data.get('content') |
102 properties['content'] = form.cleaned_data.get('content') |
103 properties['user'] = models.user.logic.getFromFields(email=email) |
103 properties['user'] = models.user.logic.getFromFields(email=email) |
|
104 properties['is_featured'] = form.cleaned_data.get('is_featured') |
104 |
105 |
105 doc = document.logic.updateOrCreateFromFields(properties, |
106 doc = document.logic.updateOrCreateFromFields(properties, |
106 partial_path=partial_path, |
107 partial_path=partial_path, |
107 link_name=link_name) |
108 link_name=link_name) |
108 return doc |
109 return doc |
186 # populate form with the existing User entity |
187 # populate form with the existing User entity |
187 form = EditForm(initial={'doc_key_name': doc.key().name(), |
188 form = EditForm(initial={'doc_key_name': doc.key().name(), |
188 'title': doc.title, 'partial_path': doc.partial_path, |
189 'title': doc.title, 'partial_path': doc.partial_path, |
189 'link_name': doc.link_name, 'short_name': doc.short_name, |
190 'link_name': doc.link_name, 'short_name': doc.short_name, |
190 'abstract': doc.abstract, 'content': doc.content, |
191 'abstract': doc.abstract, 'content': doc.content, |
191 'user': doc.user}) |
192 'user': doc.user, 'is_featured': doc.is_featured}) |
192 else: |
193 else: |
193 if request.GET.get(profile.SUBMIT_MSG_PARAM_NAME): |
194 if request.GET.get(profile.SUBMIT_MSG_PARAM_NAME): |
194 # redirect to aggressively remove 'Profile saved' query parameter |
195 # redirect to aggressively remove 'Profile saved' query parameter |
195 return http.HttpResponseRedirect(request.path) |
196 return http.HttpResponseRedirect(request.path) |
196 |
197 |