def _q_index(request): errors = [] user = request.user emails = user.emails if request.method == "POST": email = request.get_form_var('email') errors = CodeDoubanUserEmails.validate(user.name, email) if not errors: CodeDoubanUserEmails.add(user.name, email) return request.redirect('/settings/emails') return st('/settings/emails.html', **locals())
def __init__(self, user, email_id): self.user = user self.email_id = email_id self.user_email = CodeDoubanUserEmails.check_own_by_user( user.name, email_id)
def __init__(self, user, email_id): self.user = user self.email_id = email_id self.user_email = CodeDoubanUserEmails.check_own_by_user(user.name, email_id)