本文整理汇总了Python中gitshell.gsuser.models.GsuserManager.list_useremail_by_userId方法的典型用法代码示例。如果您正苦于以下问题:Python GsuserManager.list_useremail_by_userId方法的具体用法?Python GsuserManager.list_useremail_by_userId怎么用?Python GsuserManager.list_useremail_by_userId使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类gitshell.gsuser.models.GsuserManager
的用法示例。
在下文中一共展示了GsuserManager.list_useremail_by_userId方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: emails
# 需要导入模块: from gitshell.gsuser.models import GsuserManager [as 别名]
# 或者: from gitshell.gsuser.models.GsuserManager import list_useremail_by_userId [as 别名]
def emails(request):
current = 'emails'; title = u'设置 / 邮箱'
useremails = GsuserManager.list_useremail_by_userId(request.user.id)
response_dictionary = {'current': current, 'title': title, 'useremails': useremails}
return render_to_response('settings/emails.html',
response_dictionary,
context_instance=RequestContext(request))
示例2: notif
# 需要导入模块: from gitshell.gsuser.models import GsuserManager [as 别名]
# 或者: from gitshell.gsuser.models.GsuserManager import list_useremail_by_userId [as 别名]
def notif(request):
current = 'notif'; title = u'设置 / 通知'
notifSetting = FeedManager.get_notifsetting_by_userId(request.user.id)
useremails = GsuserManager.list_useremail_by_userId(request.user.id)
response_dictionary = {'current': current, 'title': title, 'notif_type_choice': NOTIF_TYPE.NOTIF_TYPE_CHOICE, 'notif_fqcy_choice': NOTIF_FQCY.NOTIF_FQCY_CHOICE, 'notifSetting': notifSetting, 'useremails': useremails}
return render_to_response('settings/notif.html',
response_dictionary,
context_instance=RequestContext(request))
示例3: email_primary
# 需要导入模块: from gitshell.gsuser.models import GsuserManager [as 别名]
# 或者: from gitshell.gsuser.models.GsuserManager import list_useremail_by_userId [as 别名]
def email_primary(request, eid):
usermail = GsuserManager.get_useremail_by_id(eid)
if not usermail or usermail.user_id != request.user.id:
return json_failed(500, u'设置失败,没有权限')
useremails = GsuserManager.list_useremail_by_userId(request.user.id)
for x in useremails:
if usermail.id != x.id and x.is_primary == 1:
x.is_primary = 0
x.save()
usermail.is_primary = 1
usermail.save()
return json_success(u'成功设置默认邮箱 %s' % usermail.email)