Add create() wrapper views that simply call the existing edit() views, to
authorTodd Larsen <tlarsen@google.com>
Sat, 04 Oct 2008 04:51:43 +0000
changeset 278 b0e2d509b5c3
parent 277 85f7d537e4d7
child 279 6314fce617c5
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
app/soc/views/site/sponsor/profile.py
app/soc/views/user/profile.py
--- 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)