diff --git a/carpool/static/images/iitmandiLogo.png b/carpool/static/images/iitmandiLogo.png new file mode 100644 index 0000000..41cfe35 Binary files /dev/null and b/carpool/static/images/iitmandiLogo.png differ diff --git a/carpool/templates/acc_active_email.html b/carpool/templates/acc_active_email.html index 17ba3ed..b39a319 100644 --- a/carpool/templates/acc_active_email.html +++ b/carpool/templates/acc_active_email.html @@ -1,5 +1,117 @@ -{% autoescape off %} + + + + + +{% load static %} + + + + Account Confirmation + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +

CAR-POOL

+
+ + + + +
+

Hi{{ user.first_name }}

+
+
+ + + + + + + + + + + + + + + +
+

Thank You for registering in car-pool. We're excited to have you get started

+
+

Please click on the link below to confirm your registration for Car Pool app IIT Mandi.

+
+

http://{{ domain }}{% url 'activate' uidb64=uid token=token %}

+
+

If you have any questions, just reply to this email—we're always happy to help out.

+
+

Cheers,
Kamandprompt Team

+
+
+ + + + +
+
+ + + + + \ No newline at end of file diff --git a/carpool/templates/add.html b/carpool/templates/add.html index b8f7178..bd27f73 100755 --- a/carpool/templates/add.html +++ b/carpool/templates/add.html @@ -92,7 +92,7 @@

Add new ride

- + {% include 'messages.html' %}
{% csrf_token %} {% for field in form %} diff --git a/carpool/templates/messages.html b/carpool/templates/messages.html new file mode 100644 index 0000000..9ecf9c3 --- /dev/null +++ b/carpool/templates/messages.html @@ -0,0 +1,10 @@ +{% if messages %} + {% for message in messages %} +
+ + {{message}} +
+ {% endfor %} +{% endif %} \ No newline at end of file diff --git a/carpool/views.py b/carpool/views.py index 9651308..12fe3a8 100644 --- a/carpool/views.py +++ b/carpool/views.py @@ -11,7 +11,7 @@ from .forms import SignUpForm, PoolForm, filterForm, DeleteForm, AddForm from .models import Pool, User - +from django.contrib import messages def IITmail(request): s = request.POST['email'] @@ -127,6 +127,10 @@ def addPool(request): form = PoolForm(request.POST, initial={'paid': False, 'user': request.user}) if form.is_valid(): form.save() + messages.success(request, 'form submitted successfully.') + return render(request, 'add.html', {'form': form}) + else: + messages.error(request, 'Invalid form submission.') else: form = PoolForm(initial={'paid': False, 'user': request.user}) return render(request, 'add.html', {'form': form}) @@ -147,3 +151,5 @@ def activate(request, uidb64, token): return HttpResponse('Thank you for your email confirmation. Now you can login your account.') else: return HttpResponse('Activation link is invalid!') + +