equal
deleted
inserted
replaced
74 if not validate.isLinkNameFormatValid(link_name): |
74 if not validate.isLinkNameFormatValid(link_name): |
75 raise forms.ValidationError("This link name is in wrong format.") |
75 raise forms.ValidationError("This link name is in wrong format.") |
76 return link_name |
76 return link_name |
77 |
77 |
78 |
78 |
79 DEF_SITE_SPONSOR_PROFILE_EDIT_TMPL = 'soc/group/profile/edit.html' |
79 DEF_SITE_SPONSOR_PROFILE_EDIT_TMPL = 'soc/site/sponsor/profile/edit.html' |
80 DEF_SPONSOR_NO_LINKNAME_CHANGE_MSG = 'Sponsor link name cannot be changed.' |
80 DEF_SPONSOR_NO_LINKNAME_CHANGE_MSG = 'Sponsor link name cannot be changed.' |
81 DEF_CREATE_NEW_SPONSOR_MSG = ' You can create a new sponsor by visiting' \ |
81 DEF_CREATE_NEW_SPONSOR_MSG = ' You can create a new sponsor by visiting' \ |
82 ' <a href="/site/sponsor/profile">Create ' \ |
82 ' <a href="/site/sponsor/profile">Create ' \ |
83 'a New Sponsor</a> page.' |
83 'a New Sponsor</a> page.' |
84 |
84 |
185 'group_type': 'Sponsor'}) |
185 'group_type': 'Sponsor'}) |
186 |
186 |
187 return helper.responses.respond(request, template, context) |
187 return helper.responses.respond(request, template, context) |
188 |
188 |
189 |
189 |
190 def create(request, template=DEF_SITE_SPONSOR_PROFILE_EDIT_TMPL): |
190 DEF_SITE_SPONSOR_PROFILE_CREATE_TMPL = 'soc/group/profile/edit.html' |
|
191 |
|
192 def create(request, template=DEF_SITE_SPONSOR_PROFILE_CREATE_TMPL): |
191 """create() view is same as edit() view, but with no linkname supplied. |
193 """create() view is same as edit() view, but with no linkname supplied. |
192 """ |
194 """ |
193 return edit(request, linkname=None, template=template) |
195 return edit(request, linkname=None, template=template) |
194 |
196 |
195 |
197 |