Пример #1
0
 def form_valid(self, form):
     form.save()
     u = form.ensure_authenticated_user()
     name = u.revolvuserprofile.get_full_name()
     send_signup_info.delay(name, u.email, u.revolvuserprofile.address)
     # log in the newly created user model. if there is a problem, error
     auth_login(self.request, u)
     messages.success(self.request, 'Signed up successfully!')
     return redirect("dashboard")
Пример #2
0
 def form_valid(self, form):
     form.save()
     u = form.ensure_authenticated_user()
     name = u.revolvuserprofile.get_full_name()
     send_signup_info.delay(name, u.email, u.revolvuserprofile.address)
     # log in the newly created user model. if there is a problem, error
     auth_login(self.request, u)
     messages.success(self.request, 'Signed up successfully!')
     return redirect("home")
Пример #3
0
def create_user_revolv(strategy, details, user=None, **kwargs):
    """
    Custom psa pipeline to serve create user

    :param strategy:
    :param details:
    :param user:
    :param kwargs:
    :return:
    """
    user = create_user(strategy, details, user, kwargs)
    if user['is_new']:
        _user = user['user']
        send_signup_info.delay(_user.revolvuserprofile.get_full_name(), _user.email)
    return user
Пример #4
0
def create_user_revolv(strategy, details, user=None, **kwargs):
    """
    Custom psa pipeline to serve create user

    :param strategy:
    :param details:
    :param user:
    :param kwargs:
    :return:
    """
    user = create_user(strategy, details, user, kwargs)
    if user['is_new']:
        _user = user['user']
        send_signup_info.delay(_user.revolvuserprofile.get_full_name(),
                               _user.email)
    return user