Enable recently commited delete Sponsor request handler (added to map.py) and Delete button in Sponsor edit view. Still missing "Are you sure ?" question box.
authorPawel Solyga <Pawel.Solyga@gmail.com>
Thu, 09 Oct 2008 18:11:37 +0000
changeset 292 1cece5192e26
parent 291 5905c8e97e68
child 293 1edd01373e71
Enable recently commited delete Sponsor request handler (added to map.py) and Delete button in Sponsor edit view. Still missing "Are you sure ?" question box. Patch by: Pawel Solyga Review by: to-be-reviewed
app/soc/logic/site/map.py
app/soc/views/site/sponsor/profile.py
--- a/app/soc/logic/site/map.py	Thu Oct 09 18:06:50 2008 +0000
+++ b/app/soc/logic/site/map.py	Thu Oct 09 18:11:37 2008 +0000
@@ -187,6 +187,14 @@
   short_name='Create New Site Sponsor',
   parent=site_home_edit)
 
+site_sponsor_delete = page.Page(
+  page.Url(
+    r'^site/sponsor/profile/%s/delete$' % path_linkname.LINKNAME_ARG_PATTERN,
+    'soc.views.site.sponsor.profile.delete'),
+  'Site: Delete Existing Sponsor',
+  short_name='Delete Site Sponsor',
+  parent=site_home_edit)
+
 site_sponsor_edit = page.Page(
   page.Url(
     r'^site/sponsor/profile/%s' % path_linkname.LINKNAME_ARG_PATTERN,
@@ -194,7 +202,7 @@
   'Site: Modify Existing Sponsor',
   short_name='Modify Site Sponsor',
   parent=site_home_edit)
-     
+
 site_sponsor_list = page.Page(
   page.Url(
     r'^site/sponsor/list$',
--- a/app/soc/views/site/sponsor/profile.py	Thu Oct 09 18:06:50 2008 +0000
+++ b/app/soc/views/site/sponsor/profile.py	Thu Oct 09 18:11:37 2008 +0000
@@ -76,7 +76,7 @@
     return link_name
 
 
-DEF_SITE_SPONSOR_PROFILE_EDIT_TMPL = 'soc/group/profile/edit.html'
+DEF_SITE_SPONSOR_PROFILE_EDIT_TMPL = 'soc/site/sponsor/profile/edit.html'
 DEF_SPONSOR_NO_LINKNAME_CHANGE_MSG = 'Sponsor link name cannot be changed.'
 DEF_CREATE_NEW_SPONSOR_MSG = ' You can create a new sponsor by visiting' \
                           ' <a href="/site/sponsor/profile">Create ' \
@@ -187,7 +187,9 @@
   return helper.responses.respond(request, template, context)
 
 
-def create(request, template=DEF_SITE_SPONSOR_PROFILE_EDIT_TMPL):
+DEF_SITE_SPONSOR_PROFILE_CREATE_TMPL = 'soc/group/profile/edit.html'
+
+def create(request, template=DEF_SITE_SPONSOR_PROFILE_CREATE_TMPL):
   """create() view is same as edit() view, but with no linkname supplied.
   """
   return edit(request, linkname=None, template=template)