Exemplo n.º 1
0
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())
Exemplo n.º 2
0
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())
Exemplo n.º 3
0
 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)
Exemplo n.º 4
0
 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)