From 68b005a2d6dfc71f9e377c073c696a63a89f3ad6 Mon Sep 17 00:00:00 2001 From: Drew Larson Date: Tue, 31 May 2016 08:51:00 -0600 Subject: [PATCH] Change choices and default. --- .../migrations/0015_auto_20160531_0413.py | 20 ++++++++++++++++ .../migrations/0016_auto_20160531_0416.py | 24 +++++++++++++++++++ bikeshop_project/core/models.py | 14 +++++------ 3 files changed, 51 insertions(+), 7 deletions(-) create mode 100644 bikeshop_project/core/migrations/0015_auto_20160531_0413.py create mode 100644 bikeshop_project/core/migrations/0016_auto_20160531_0416.py diff --git a/bikeshop_project/core/migrations/0015_auto_20160531_0413.py b/bikeshop_project/core/migrations/0015_auto_20160531_0413.py new file mode 100644 index 0000000..3e6bdc0 --- /dev/null +++ b/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), + ), + ] diff --git a/bikeshop_project/core/migrations/0016_auto_20160531_0416.py b/bikeshop_project/core/migrations/0016_auto_20160531_0416.py new file mode 100644 index 0000000..55ee7fc --- /dev/null +++ b/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), + ), + ] diff --git a/bikeshop_project/core/models.py b/bikeshop_project/core/models.py index 1127e6e..828ea8c 100644 --- a/bikeshop_project/core/models.py +++ b/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)