Skip to content
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

Add Support for Tiered Pricing Plans #629

Open
wants to merge 14 commits into
base: original
Choose a base branch
from
Prev Previous commit
Next Next commit
Update Migrations
  • Loading branch information
jksimoniii committed Feb 3, 2019
commit 421bb782abdfb5b634acfba082e10fb75ac9b2e7
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Generated by Django 2.2a1 on 2019-02-01 21:19
# Generated by Django 2.2a1 on 2019-02-03 14:44

from django.db import migrations, models
import django.db.models.deletion
Expand All @@ -25,8 +25,8 @@ class Migration(migrations.Migration):
name='Tier',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('amount', models.DecimalField()),
('flat_amount', models.DecimalField()),
('amount', models.DecimalField(decimal_places=2, max_digits=9)),
('flat_amount', models.DecimalField(decimal_places=2, max_digits=9)),
('up_to', models.DecimalField(blank=True, null=True)),
('plan', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='tiers', to='pinax_stripe.Plan')),
],
Expand Down
4 changes: 2 additions & 2 deletions pinax/stripe/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -671,8 +671,8 @@ def stripe_bankaccount(self):
class Tier(models.Model):

plan = models.ForeignKey(Plan, related_name="tiers", on_delete=models.CASCADE)
amount = models.DecimalField()
flat_amount = models.DecimalField()
amount = models.DecimalField(decimal_places=2, max_digits=9)
flat_amount = models.DecimalField(decimal_places=2, max_digits=9)
up_to = models.DecimalField(blank=True, null=True)

objects = models.Manager()
Expand Down