def sign_up(request): form = SignUpForm() if request.method == "POST": form = SignUpForm(request.POST) if form.is_valid(): form.save() messages.success(request, 'Account Created Successfully') return HttpResponseRedirect(reverse('App_Login:login')) return render(request, 'App_Login/sign_up.html', context={'form': form})
def sign_up(request): form=SignUpForm() if request.method == 'POST': form=SignUpForm(request.POST) if form.is_valid(): form.save() messages.success(request,"Account created successfully") return HttpResponse('signup successfully') return render(request,'App_Login/sign_up.html',context={'form':form})
def sign_up(request): form = SignUpForm() registered = False if request.method == 'POST': form = SignUpForm(data=request.POST) if form.is_valid(): form.save() registered = True dict = {'form': form, 'registered': registered} return render(request, 'App_Login/signup.html', context=dict)
def signupview(request): form = SignUpForm() if request.method == 'POST': form = SignUpForm(data=request.POST) if form.is_valid(): form.save() messages.info(request, 'Account Created Succesfully!!!!!') return HttpResponseRedirect(reverse('App_Video:home')) dicts = {'form': form} return render(request, 'App_Login/form.html', context=dicts)
def learner_signup(request): form = SignUpForm() if request.method == 'POST': form = SignUpForm(data=request.POST) if form.is_valid(): user = form.save() learner_profile = Learner(user=request.user) learner_profile.save() return HttpResponseRedirect(reverse('App_Login:learner_login')) return render(request, 'App_Login/signup.html', context={'form': form})
def sign_up(request): form = SignUpForm() registered = False if request.method == 'POST': form = SignUpForm(data=request.POST) if form.is_valid(): form.save() registered = True # messages.success(request, "Registered Successfully. Please Login!") dict = {'form': form, 'registered': registered} return render(request, 'App_Login/signup.html', context=dict)
def sign_up(request): form = SignUpForm() if request.method == 'POST' or request.method == 'post': form = SignUpForm(request.POST) if form.is_valid(): form.save() messages.success(request, "Your Account is Successfully Created!") # return HttpResponseRedirect(reverse('App_Login:login')) return redirect('App_Shop:home') return render(request, 'App_Login/sign_up.html', context={'form': form})
def signup_system(request): form = SignUpForm() if request.method == 'POST': form = SignUpForm(data=request.POST) if form.is_valid(): form.save() username = form.cleaned_data.get('username') passwd = form.cleaned_data.get('password1') this_user = authenticate(username=username, password=passwd) if this_user is not None: login(request, this_user) return HttpResponseRedirect( reverse('App_Login:faculty-signup')) return render(request, 'App_Login/signup.html', context={'form': form})
def sign_up(request): form = SignUpForm() if request.method == 'POST': form = SignUpForm(request.POST) if form.is_valid(): form.save() messages.success(request, "Sign Up Successful") return HttpResponseRedirect(reverse('App_Login:login')) return render(request, 'App_Login/signup.html', context={ 'title': 'SignUp', 'form': form })
def SignUp(request): form = SignUpForm() registered = False if request.method == "POST": form = SignUpForm(data=request.POST) if form.is_valid(): form.save() registered = True messages.success(request, 'Account created successfully') return HttpResponseRedirect(reverse('App_Login:login')) return render(request, 'App_Login/signup.html', context={ 'form': form, 'registered': registered })
def sign_up(request): form = SignUpForm() # registered = False if request.method == 'POST': form = SignUpForm(data=request.POST) if form.is_valid(): # user.is_active=False form.save() # registered = Truex template = render_to_string( 'App_Login/email_template.html', {'name': form.cleaned_data.get('username')}) email = EmailMessage( template, settings.EMAIL_HOST_USER, [form.cleaned_data.get('email')], ) dict = {'form': form, 'registered': registered} return render(request, 'App_Login/signup.html', context=dict)