Add create() wrapper views that simply call the existing edit() views, to
produce unique view names in preparation for the soc/logic/site/map.py code.
Patch by: Todd Larsen
Review by: to-be-reviewed
--- a/app/soc/views/site/sponsor/profile.py Sat Oct 04 04:42:37 2008 +0000
+++ b/app/soc/views/site/sponsor/profile.py Sat Oct 04 04:51:43 2008 +0000
@@ -184,4 +184,10 @@
'existing_group': existing_sponsor,
'group_type': 'Sponsor'})
- return helper.responses.respond(request, template, context)
\ No newline at end of file
+ return helper.responses.respond(request, template, context)
+
+
+def create(request, template=DEF_SITE_SPONSOR_PROFILE_EDIT_TMPL):
+ """create() view is same as edit() view, but with no linkname supplied.
+ """
+ return edit(request, linkname=None, template=template)
--- a/app/soc/views/user/profile.py Sat Oct 04 04:42:37 2008 +0000
+++ b/app/soc/views/user/profile.py Sat Oct 04 04:51:43 2008 +0000
@@ -163,3 +163,9 @@
context['form'] = form
return helper.responses.respond(request, template, context)
+
+
+def create(request, template=DEF_USER_PROFILE_EDIT_TMPL):
+ """create() view is same as edit() view, but with no linkname supplied.
+ """
+ return edit(request, linkname=None, template=template)