-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue#17 #18
base: master
Are you sure you want to change the base?
Issue#17 #18
Changes from 3 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
<html class="not-ie no-js" lang="en"> | ||
{% load static %} | ||
|
||
<head> | ||
|
||
<!-- Basic Page Needs --> | ||
<meta charset="utf-8"> | ||
<title>My ride</title> | ||
<meta name="description" content=""> | ||
<meta name="author" content=""> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | ||
|
||
<!-- Mobile Specific Metas --> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
|
||
<!-- Styles --> | ||
|
||
<!-- Bootstrap --> | ||
<link href="{% static 'css/bootstrap.min.css' %}" rel="stylesheet"> | ||
<!-- Forms --> | ||
<link href="{% static 'css/jquery.idealforms.css' %}" rel="stylesheet"> | ||
<!-- Select --> | ||
<link href="{% static 'css/jquery.idealselect.css' %}" rel="stylesheet"> | ||
<!-- Slicknav --> | ||
<link href="{% static 'css/slicknav.css' %}" rel="stylesheet"> | ||
<!-- Main style --> | ||
<link href="{% static 'css/styles.css' %}" rel="stylesheet"> | ||
|
||
<!-- Modernizr --> | ||
<script src="{% static 'js/modernizr.js' %}"></script> | ||
|
||
<!-- Fonts --> | ||
<link href="{% static 'css/font-awesome.min.css' %}" rel="stylesheet"> | ||
<link href='http://fonts.googleapis.com/css?family=Montserrat' rel='stylesheet' type='text/css'> | ||
<link rel="shortcut icon" type="image/ico" href="{% static 'img/favicon.ico' %}"/> | ||
|
||
</head> | ||
|
||
<body> | ||
<h1>please check your email. A confirmation link has been sent to you by [email protected]</h1> | ||
</body> | ||
|
||
</html> |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,15 +24,16 @@ def IITmail(request): | |
|
||
def new(request): | ||
error="" | ||
done=False | ||
if request.user.is_authenticated: | ||
return HttpResponseRedirect('/') | ||
if request.method == 'POST': | ||
elif request.method == 'POST': | ||
form = SignUpForm(request.POST) | ||
if not IITmail(request): | ||
error+="Please use an IIT Mandi email." | ||
return render(request, 'signup.html', {'form': form, 'error': error,}) | ||
elif not form.is_valid(): | ||
error+="Invalid information/ Email already in use." | ||
return render(request, 'signup.html', {'form': form, 'error': error,}) | ||
else: | ||
user = form.save(commit=False) | ||
user.is_active = False | ||
|
@@ -47,12 +48,15 @@ def new(request): | |
}) | ||
to_email = form.cleaned_data.get('email') | ||
send_mail(mail_subject, message, '[email protected]', [to_email], fail_silently=False) | ||
done=True | ||
HttpResponseRedirect("{% url 'polls.signupcomp' %}") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Add a |
||
# email = EmailMessage(mail_subject, message, to=[to_email]) | ||
# email.send() | ||
else: | ||
form = SignUpForm() | ||
return render(request, 'signup.html', {'form': form, 'error': error, 'done': done, }) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It is better to have a combined |
||
return render(request, 'signup.html', {'form': form, 'error': error,}) | ||
|
||
def signupcomp(request): | ||
return render(request,"signupcomp.html") | ||
|
||
|
||
def log(request): | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
elif
is not required here as the firstif
has a return at its end.