Browse Source

Pricing updates.

pull/117/head
Pēteris Caune 8 years ago
parent
commit
666706ef3e
3 changed files with 14 additions and 11 deletions
  1. +2
    -2
      hc/payments/models.py
  2. +3
    -3
      hc/payments/views.py
  3. +9
    -6
      templates/payments/pricing.html

+ 2
- 2
hc/payments/models.py View File

@ -29,8 +29,8 @@ class Subscription(models.Model):
def price(self): def price(self):
if self.plan_id == "P5": if self.plan_id == "P5":
return 5 return 5
elif self.plan_id == "P20":
return 20
elif self.plan_id == "P75":
return 75
return 0 return 0


+ 3
- 3
hc/payments/views.py View File

@ -55,7 +55,7 @@ def log_and_bail(request, result):
@require_POST @require_POST
def create_plan(request): def create_plan(request):
plan_id = request.POST["plan_id"] plan_id = request.POST["plan_id"]
if plan_id not in ("P5", "P20"):
if plan_id not in ("P5", "P75"):
return HttpResponseBadRequest() return HttpResponseBadRequest()
sub = Subscription.objects.for_user(request.user) sub = Subscription.objects.for_user(request.user)
@ -110,8 +110,8 @@ def create_plan(request):
profile.ping_log_limit = 1000 profile.ping_log_limit = 1000
profile.team_access_allowed = True profile.team_access_allowed = True
profile.save() profile.save()
elif plan_id == "P20":
profile.ping_log_limit = 10000
elif plan_id == "P75":
profile.ping_log_limit = 1000
profile.team_access_allowed = True profile.team_access_allowed = True
profile.save() profile.save()


+ 9
- 6
templates/payments/pricing.html View File

@ -72,6 +72,7 @@
<li class="list-group-item"><i class="fa fa-check"></i> Unlimited Alerts</li> <li class="list-group-item"><i class="fa fa-check"></i> Unlimited Alerts</li>
<li class="list-group-item">100 log entries per check</li> <li class="list-group-item">100 log entries per check</li>
<li class="list-group-item">One User</li> <li class="list-group-item">One User</li>
<li class="list-group-item">&nbsp;</li>
</ul> </ul>
<div class="panel-footer"> <div class="panel-footer">
{% if request.user.is_authenticated %} {% if request.user.is_authenticated %}
@ -106,6 +107,7 @@
<li class="list-group-item">Unlimited Alerts</li> <li class="list-group-item">Unlimited Alerts</li>
<li class="list-group-item">1000 log entries per check</li> <li class="list-group-item">1000 log entries per check</li>
<li class="list-group-item">Team Access</li> <li class="list-group-item">Team Access</li>
<li class="list-group-item">Email Support</li>
</ul> </ul>
<div class="panel-footer"> <div class="panel-footer">
{% if request.user.is_authenticated %} {% if request.user.is_authenticated %}
@ -117,7 +119,7 @@
<button <button
data-plan-id="P5" data-plan-id="P5"
class="btn btn-lg btn-default btn-create-payment-method"> class="btn btn-lg btn-default btn-create-payment-method">
{% if sub.plan_id == "P20" %}
{% if sub.plan_id == "P75" %}
Switch to $5/mo Switch to $5/mo
{% else %} {% else %}
Upgrade your Account Upgrade your Account
@ -134,29 +136,30 @@
</div> </div>
<!-- /item --> <!-- /item -->
<!-- P20 -->
<!-- P75 -->
<div class="col-sm-4 text-center"> <div class="col-sm-4 text-center">
<div class="panel panel-default panel-pricing"> <div class="panel panel-default panel-pricing">
<div class="panel-body text-center"> <div class="panel-body text-center">
<p>$20<span class="mo">/mo</span></p>
<p>$75<span class="mo">/mo</span></p>
</div> </div>
<ul class="list-group text-center"> <ul class="list-group text-center">
<li class="list-group-item">Personal or Commercial use</li> <li class="list-group-item">Personal or Commercial use</li>
<li class="list-group-item">Unlimited Checks</li> <li class="list-group-item">Unlimited Checks</li>
<li class="list-group-item">Unlimited Alerts</li> <li class="list-group-item">Unlimited Alerts</li>
<li class="list-group-item">10'000 log entries per check</li>
<li class="list-group-item">1000 log entries per check</li>
<li class="list-group-item">Team Access</li> <li class="list-group-item">Team Access</li>
<li class="list-group-item">Priority Email Support</li>
</ul> </ul>
<div class="panel-footer"> <div class="panel-footer">
{% if request.user.is_authenticated %} {% if request.user.is_authenticated %}
{% if sub.plan_id == "P20" %}
{% if sub.plan_id == "P75" %}
<button class="btn btn-lg btn-success disabled"> <button class="btn btn-lg btn-success disabled">
Selected Selected
</button> </button>
{% else %} {% else %}
<button <button
data-plan-id="P20"
data-plan-id="P75"
class="btn btn-lg btn-default btn-create-payment-method"> class="btn btn-lg btn-default btn-create-payment-method">
Upgrade Your Account Upgrade Your Account
</button> </button>


Loading…
Cancel
Save