Make shack profile into OneToOneRel
This commit is contained in:
parent
f179ac2ccd
commit
48878ff1b0
22
byro_shackspace/migrations/0002_auto_20180113_1330.py
Normal file
22
byro_shackspace/migrations/0002_auto_20180113_1330.py
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
# Generated by Django 1.11.8 on 2018-01-13 13:30
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
|
import annoying.fields
|
||||||
|
from django.db import migrations
|
||||||
|
import django.db.models.deletion
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('byro_shackspace', '0001_initial'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='shackprofile',
|
||||||
|
name='member',
|
||||||
|
field=annoying.fields.AutoOneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='profile_shack', to='members.Member'),
|
||||||
|
),
|
||||||
|
]
|
@ -1,8 +1,9 @@
|
|||||||
|
from annoying.fields import AutoOneToOneField
|
||||||
from django.db import models
|
from django.db import models
|
||||||
|
|
||||||
|
|
||||||
class ShackProfile(models.Model):
|
class ShackProfile(models.Model):
|
||||||
member = models.ForeignKey(
|
member = AutoOneToOneField(
|
||||||
to='members.Member',
|
to='members.Member',
|
||||||
on_delete=models.CASCADE,
|
on_delete=models.CASCADE,
|
||||||
related_name='profile_shack',
|
related_name='profile_shack',
|
||||||
|
Loading…
Reference in New Issue
Block a user