Skip to content

Commit ec71f11

Browse files
committed
Improve code indentation and spacing
1 parent 7238095 commit ec71f11

File tree

5 files changed

+468
-164
lines changed

5 files changed

+468
-164
lines changed

checkout/templates/checkout.html

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -13,34 +13,40 @@
1313
<!-- Stripe JS -->
1414
<script type="text/javascript" src="{% static 'js/stripe.js' %}"></script>
1515
{% endblock head %}
16-
{% block page_heading %}<span class="material-icons">
16+
{% block page_heading %}<span class="material-icons heading-icon">
1717
shopping_cart
1818
</span> Checkout<br>
1919
<hr>{% endblock %}
2020
{% block container-class %}checkout-container{% endblock %}
2121
{% block content %}
22-
<div class="jumbotron mx-auto" style="max-width: 1200px;">
22+
<div class="jumbotron mx-auto" id="checkout-jumbotron">
2323
<div class="row">
2424
<div class="col-12">
2525
<h3>Go PRO</h3>
26-
<b>Includes:</b>
27-
<ul>
28-
<li>Unlimited Tickets/month</li>
29-
<li>KANBAN View</li>
30-
<li>24/7 Live Support</li>
26+
<hr>
27+
<b>Unlocked Features:</b>
28+
<br>
29+
<br>
30+
<ul class="list-group plan-list-group text-left">
31+
<li class="list-group-item"><i class="material-icons align-top">check_circle_outline</i>
32+
UNLIMITED Tickets/month
33+
</li>
34+
<li class="list-group-item"><i class="material-icons align-top">check_circle_outline</i>
35+
KANBAN View
36+
</li>
3137
</ul>
32-
<p class="lead">Total Due: 9.90 EUR (Single Payment)</p>
33-
<!-- <p><span class="glyphicon glyphicon-euro" aria-hidden="true"></span>{{ total }}</p> -->
38+
<br>
39+
<p class="lead"><b>Total Due: 9.90 EUR (Single Payment)</b></p>
3440
<form role="form" method="post" id="payment-form" action="{% url 'checkout' %}" enctype="multipart/form-data">
3541
{% csrf_token %}
3642
<div class="row">
37-
<div id="credit-card-errors" style="display: none;">
43+
<div id="credit-card-errors">
3844
<div id="alert-message block-message error" id="stripe-error-message"></div>
3945
</div>
4046
</div>
4147
<div class="row">
4248
<div class="col-md-9 col-lg-6">
43-
<legend>Your Details</legend>
49+
<p class="lead">Your Details</p>
4450
{{ order_form.full_name | as_crispy_field }}
4551
</div>
4652
</div>
@@ -72,8 +78,8 @@ <h3>Go PRO</h3>
7278
</div>
7379
</div>
7480
<div class="row">
75-
<legend>Payment Details</legend>
7681
<div class="col-md-12 col-lg-6">
82+
<p class="lead">Payment Details</p>
7783
{{ payment_form.credit_card_number | as_crispy_field }}
7884
</div>
7985
</div>
@@ -99,5 +105,4 @@ <h3>Go PRO</h3>
99105
</form>
100106
</div>
101107
</div>
102-
</div>
103108
{% endblock %}

checkout/views.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ def checkout(request):
4646
# Set 'is_pro_user' to True
4747
user = get_object_or_404(Profile, user_id=request.user.id)
4848
user.is_pro_user = True
49+
user.date_turned_pro = timezone.now()
4950
user.save()
5051
messages.success(
5152
request, "You have successfully paid. Enjoy PRO!")

0 commit comments

Comments
 (0)