summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--static/website/templates/contact.html55
-rw-r--r--static/website/templates/schedule.html3
-rw-r--r--static/website/templates/venue.html2
-rw-r--r--website/urls.py1
-rw-r--r--website/views.py27
5 files changed, 52 insertions, 36 deletions
diff --git a/static/website/templates/contact.html b/static/website/templates/contact.html
index a6959b6..7ed6d37 100644
--- a/static/website/templates/contact.html
+++ b/static/website/templates/contact.html
@@ -6,39 +6,24 @@ Contact Us
{% block content %}
<h3>Contact Us</h3>
-<p>For any queries regarding registration, accomodation or any other issues, please feel free to contact us.</p>
-<table class="table table-bordered">
- <tr>
- <td>
- FOSSEE (cfd-lab)
- </td>
- <td>
- +91-22-25764133
- </td>
- <td>
- <a href="mailto:scipy@fossee.in">scipy[at]fossee[dot]in</a>
- </td>
- </tr>
- <tr>
- <td>
- Hardik Ghaghada
- </td>
- <td>
- +91-8879261812
- </td>
- <td>
- <a href="mailto:hardik@fossee.in">hardik[at]fossee[dot]in</a>
- </td>
- </tr>
-</table>
-<table class="table table-bordered">
- <tr>
- <td>
- Alternatively you may write us on
- </td>
- <td>
- <a href="mailto:info@fossee.in">info[at]fossee[dot]in</a>
- </td>
- </tr>
-</table>
+<hr>
+
+<p>Feel free to drop us a message regarding any of your queries.</p>
+
+{% if mailsent %}
+<p>Thank you for contacting us ! We will be reaching you out soon.</p>
+{% endif %}
+
+<form action="/test-contact/" method="POST" role="form">
+{% csrf_token %}
+ <label for="user_email">Your Email</label>
+ <input name="user_email" id="user_email" type="text" class="form-control">
+ <label for="user_name">Your Name</label>
+ <input name="user_name" id="user_name" type="text" class="form-control">
+ <label for="subject">Subject</label>
+ <input name="subject" id="subject" type="text" class="form-control">
+ <label for="message">Your Message</label><br>
+ <textarea name="message" rows="4" cols="75"></textarea>
+ <br><input class="btn btn-default" type="submit" value="Send">
+</form>
{% endblock %}
diff --git a/static/website/templates/schedule.html b/static/website/templates/schedule.html
index a79a7fb..0f07773 100644
--- a/static/website/templates/schedule.html
+++ b/static/website/templates/schedule.html
@@ -5,7 +5,8 @@ Schedule
{% endblock %}
{% block content %}
-<h3>Contact Us</h3>
+<h3>Schedule</h3>
+<hr>
<p>
<em>
Will be updated soon.
diff --git a/static/website/templates/venue.html b/static/website/templates/venue.html
index 5e1935c..1adff73 100644
--- a/static/website/templates/venue.html
+++ b/static/website/templates/venue.html
@@ -8,6 +8,8 @@ Venue
{% endblock %}
{% block content %}
+<h3>Venue - IIT Bombay</h3>
+<hr>
<div>
<iframe src="https://www.google.com/maps/embed?pb=!1m14!1m8!1m3!1d942.3681463328357!2d72.916895!3d19.130779999999998!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x3be7c7f4215f57bf%3A0xcf0c03ea45a113e1!2sLecture+Hall+Complex+(LHC)!5e0!3m2!1sen!2sin!4v1410350543516" width="930" height="450" frameborder="0" style="border:0"></iframe>
</div>
diff --git a/website/urls.py b/website/urls.py
index e65cb69..26f3c7f 100644
--- a/website/urls.py
+++ b/website/urls.py
@@ -9,6 +9,7 @@ urlpatterns = patterns('',
url(r'^schedule/$', 'website.views.schedule', name='schedule'),
url(r'^sponsors/$', 'website.views.sponsors', name='sponsors'),
url(r'^contact/$', 'website.views.contact', name='contact'),
+ url(r'^test-contact/$', 'website.views.testcontact', name='testcontact'),
url(r'^register/$', 'website.views.register', name='register'),
url(r'^invited-speakers/$', 'website.views.invited_speakers', name='invited_speakers'),
url(r'^call-for-proposals/$', 'website.views.call_for_proposals', name='call_for_proposals'),
diff --git a/website/views.py b/website/views.py
index 7c1bf98..cd69a34 100644
--- a/website/views.py
+++ b/website/views.py
@@ -3,6 +3,7 @@ from django.core.context_processors import csrf
from django.views.decorators.csrf import csrf_exempt
from django.shortcuts import render
from django.template import RequestContext
+from django.core.mail import send_mail
from website.forms import UserLoginForm, UserRegisterForm, ProposalForm
from website.models import Proposal
@@ -17,8 +18,34 @@ def venue(request):
return render(request, 'website/templates/venue.html')
def contact(request):
+ """if request.method == "POST":
+ context = {}
+ context.update(csrf(request))
+ from_email = request.POST['user_email']
+ to = ("scipy@fossee.in",)
+ subject = request.POST['subject']
+ message = request.POST['message']
+ send_mail(subject, message, from_email, to, fail_silently=False)
+ context['mailsent'] = True
+ return render(request, 'website/templates/contact.html', context)"""
return render(request, 'website/templates/contact.html')
+
+def testcontact(request):
+ if request.method == "POST":
+ context = {}
+ context.update(csrf(request))
+ from_email = request.POST['user_email']
+ to = ("scipy@fossee.in",)
+ subject = request.POST['subject']
+ message = request.POST['message']
+ send_mail(subject, message, from_email, to, fail_silently=False)
+ context['mailsent'] = True
+ return render(request, 'website/templates/contact.html', context)
+ return render(request, 'website/templates/contact.html')
+
+
+
def register(request):
return render(request, 'website/templates/register.html')