Browse Source

Change choices and default.

feature/python-error-tracking
Drew Larson 9 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): class Payment(models.Model):
payment_choices = ( payment_choices = (
('CASH', 'cash'), ('NONE', 'None'),
('CHEQUE', 'cheque'), ('CASH', 'Cash'),
('VOLUNTEERING', 'volunteering'), ('CHEQUE', 'Cheque'),
('STRIPE', 'stripe'), ('VOLUNTEERING', 'Volunteering'),
('PAYPAL', 'paypal') ('STRIPE', 'Stripe'),
('PAYPAL', 'PayPal')
) )
type = models.CharField(max_length=12, choices=payment_choices) type = models.CharField(max_length=12, choices=payment_choices, default='NONE')
paid = models.BooleanField(default=False)
created_at = models.DateTimeField(auto_now_add=True) created_at = models.DateTimeField(auto_now_add=True)

Loading…
Cancel
Save