mirror of
https://github.com/fspc/workstand.git
synced 2025-02-23 09:13:23 -05:00
Move payment field to membership.
This commit is contained in:
parent
6dcadff056
commit
3890fe41a8
25
bikeshop_project/core/migrations/0008_auto_20160526_0059.py
Normal file
25
bikeshop_project/core/migrations/0008_auto_20160526_0059.py
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
# Generated by Django 1.9.4 on 2016-05-26 00:59
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
import django.db.models.deletion
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('core', '0007_auto_20160501_2253'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.RemoveField(
|
||||||
|
model_name='payment',
|
||||||
|
name='membership',
|
||||||
|
),
|
||||||
|
migrations.AddField(
|
||||||
|
model_name='membership',
|
||||||
|
name='payment',
|
||||||
|
field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='core.Payment'),
|
||||||
|
),
|
||||||
|
]
|
@ -6,21 +6,18 @@ class Membership(models.Model):
|
|||||||
created_at = models.DateTimeField(auto_now_add=True)
|
created_at = models.DateTimeField(auto_now_add=True)
|
||||||
modified_at = models.DateTimeField(auto_now=True)
|
modified_at = models.DateTimeField(auto_now=True)
|
||||||
renewed_at = models.DateTimeField(default=timezone.now)
|
renewed_at = models.DateTimeField(default=timezone.now)
|
||||||
member = models.OneToOneField(
|
|
||||||
'registration.Member',
|
|
||||||
on_delete=models.CASCADE,
|
|
||||||
related_name='membership'
|
|
||||||
)
|
|
||||||
self_identification = models.CharField(max_length=255, null=True, blank=True)
|
self_identification = models.CharField(max_length=255, null=True, blank=True)
|
||||||
gender = models.CharField(max_length=255, null=True, blank=True)
|
gender = models.CharField(max_length=255, null=True, blank=True)
|
||||||
involvement = models.CharField(max_length=255, null=True, blank=True)
|
involvement = models.CharField(max_length=255, null=True, blank=True)
|
||||||
|
payment = models.ForeignKey(
|
||||||
|
'Payment',
|
||||||
|
on_delete=models.CASCADE,
|
||||||
|
blank=False,
|
||||||
|
null=True
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
class Payment(models.Model):
|
class Payment(models.Model):
|
||||||
membership = models.ForeignKey(
|
|
||||||
'Membership',
|
|
||||||
on_delete=models.CASCADE,
|
|
||||||
)
|
|
||||||
payment_choices = (
|
payment_choices = (
|
||||||
('CASH', 'cash'),
|
('CASH', 'cash'),
|
||||||
('CHEQUE', 'cheque'),
|
('CHEQUE', 'cheque'),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user