From 9a9a764023bb07f2d479e8ac77fb992427ad0d34 Mon Sep 17 00:00:00 2001 From: "M.Ravi" Date: Sun, 15 Oct 2017 20:06:56 +0200 Subject: [PATCH] Add preferred card field to UserCardDetail --- hosting/migrations/0044_usercarddetail.py | 6 +++--- hosting/models.py | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/hosting/migrations/0044_usercarddetail.py b/hosting/migrations/0044_usercarddetail.py index d5264cb4..b935ab9a 100644 --- a/hosting/migrations/0044_usercarddetail.py +++ b/hosting/migrations/0044_usercarddetail.py @@ -1,11 +1,10 @@ # -*- coding: utf-8 -*- -# Generated by Django 1.9.4 on 2017-10-15 17:42 +# Generated by Django 1.9.4 on 2017-10-15 18:05 from __future__ import unicode_literals -import django.db.models.deletion from django.conf import settings from django.db import migrations, models - +import django.db.models.deletion import utils.mixins @@ -24,6 +23,7 @@ class Migration(migrations.Migration): ('stripe_customer_id', models.CharField(max_length=100, unique=True)), ('last4', models.CharField(max_length=4)), ('brand', models.CharField(max_length=10)), + ('preferred', models.BooleanField(default=False)), ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), ], options={ diff --git a/hosting/models.py b/hosting/models.py index dd792ca5..a6fc0823 100644 --- a/hosting/models.py +++ b/hosting/models.py @@ -189,6 +189,7 @@ class UserCardDetail(AssignPermissionsMixin, models.Model): stripe_customer_id = models.CharField(unique=True, max_length=100) last4 = models.CharField(max_length=4) brand = models.CharField(max_length=10) + preferred = models.BooleanField(default=False) class Meta: permissions = (