Browse Source

Change choices and default.

feature/python-error-tracking
Drew Larson 8 years ago
parent
commit
68b005a2d6
  1. 20
      bikeshop_project/core/migrations/0015_auto_20160531_0413.py
  2. 24
      bikeshop_project/core/migrations/0016_auto_20160531_0416.py
  3. 14
      bikeshop_project/core/models.py

20
bikeshop_project/core/migrations/0015_auto_20160531_0413.py

@ -0,0 +1,20 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.9.4 on 2016-05-31 04:13
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('core', '0014_payment_paid'),
]
operations = [
migrations.AlterField(
model_name='payment',
name='type',
field=models.CharField(choices=[('CASH', 'cash'), ('CHEQUE', 'cheque'), ('VOLUNTEERING', 'volunteering'), ('STRIPE', 'stripe'), ('PAYPAL', 'paypal')], default='None', max_length=12),
),
]

24
bikeshop_project/core/migrations/0016_auto_20160531_0416.py

@ -0,0 +1,24 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.9.4 on 2016-05-31 04:16
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('core', '0015_auto_20160531_0413'),
]
operations = [
migrations.RemoveField(
model_name='payment',
name='paid',
),
migrations.AlterField(
model_name='payment',
name='type',
field=models.CharField(choices=[('NONE', 'None'), ('CASH', 'Cash'), ('CHEQUE', 'Cheque'), ('VOLUNTEERING', 'Volunteering'), ('STRIPE', 'Stripe'), ('PAYPAL', 'PayPal')], default='NONE', max_length=12),
),
]

14
bikeshop_project/core/models.py

@ -27,14 +27,14 @@ class Membership(models.Model):
class Payment(models.Model):
payment_choices = (
('CASH', 'cash'),
('CHEQUE', 'cheque'),
('VOLUNTEERING', 'volunteering'),
('STRIPE', 'stripe'),
('PAYPAL', 'paypal')
('NONE', 'None'),
('CASH', 'Cash'),
('CHEQUE', 'Cheque'),
('VOLUNTEERING', 'Volunteering'),
('STRIPE', 'Stripe'),
('PAYPAL', 'PayPal')
)
type = models.CharField(max_length=12, choices=payment_choices)
paid = models.BooleanField(default=False)
type = models.CharField(max_length=12, choices=payment_choices, default='NONE')
created_at = models.DateTimeField(auto_now_add=True)

Loading…
Cancel
Save