Skip to content

Commit

Permalink
Make produc tprice FloatField instead of IntegerField
Browse files Browse the repository at this point in the history
Related to #100
  • Loading branch information
sebastienbarbier committed Nov 27, 2023
1 parent 451169c commit d4a2ddb
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ See for sample https://raw.githubusercontent.com/favoloso/conventional-changelog
### ✨ Feature
- Make **trial period** customizable (#98)
- Set **auto_Sync to True** by default (#99)
- Make product price as Float (#100)
### 🔒 Security
- Migrate to **Django 4.2+** (#71)

Expand Down
18 changes: 18 additions & 0 deletions seven23/models/saas/migrations/0007_alter_product_price.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Generated by Django 4.2.7 on 2023-11-27 05:02

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('saas', '0006_auto_20200705_1039'),
]

operations = [
migrations.AlterField(
model_name='product',
name='price',
field=models.FloatField(verbose_name='Price'),
),
]
2 changes: 1 addition & 1 deletion seven23/models/saas/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def save(self, *args, **kwargs):
super(Coupon, self).save(*args, **kwargs) # Call the "real" save() method

class Product(models.Model):
price = models.IntegerField(_(u'Price'))
price = models.FloatField(_(u'Price'))
currency = models.CharField(_(u'Currency'), max_length=3, default='EUR')
duration = models.IntegerField(_(u'How many month to add'), help_text=_(u'Per month'), default=12)
valid_until = models.DateField(_(u'Valid until'), null=True, blank=True)
Expand Down

0 comments on commit d4a2ddb

Please sign in to comment.