本文整理汇总了Python中c3smembership.data.model.base.c3smember.C3sMember.get_same_lastnames方法的典型用法代码示例。如果您正苦于以下问题:Python C3sMember.get_same_lastnames方法的具体用法?Python C3sMember.get_same_lastnames怎么用?Python C3sMember.get_same_lastnames使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类c3smembership.data.model.base.c3smember.C3sMember
的用法示例。
在下文中一共展示了C3sMember.get_same_lastnames方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: HTTPFound
# 需要导入模块: from c3smembership.data.model.base.c3smember import C3sMember [as 别名]
# 或者: from c3smembership.data.model.base.c3smember.C3sMember import get_same_lastnames [as 别名]
share_acquisition.set_reference_code(
share_id,
member.email_confirm_code)
# return the user to the page she came from
if 'referrer' in request.POST:
if request.POST['referrer'] == 'dashboard':
return HTTPFound(request.route_url('dashboard'))
if request.POST['referrer'] == 'detail':
return HTTPFound(
request.route_url('detail', member_id=member.id))
return HTTPFound(request.route_url('detail', member_id=member.id))
referrer = ''
if 'dashboard' in request.referrer:
referrer = 'dashboard'
if 'detail' in request.referrer:
referrer = 'detail'
return {
'member': member,
'next_mship_number': C3sMember.get_next_free_membership_number(),
'same_mships_firstn': C3sMember.get_same_firstnames(member.firstname),
'same_mships_lastn': C3sMember.get_same_lastnames(member.lastname),
'same_mships_email': C3sMember.get_same_email(member.email),
'same_mships_dob': C3sMember.get_same_date_of_birth(
member.date_of_birth),
# keep information about the page the user came from in order to
# return her to this page
'referrer': referrer,
}