diff --git a/bikeshop_project/core/migrations/0011_auto_20160531_0233.py b/bikeshop_project/core/migrations/0011_auto_20160531_0233.py new file mode 100644 index 0000000..b310553 --- /dev/null +++ b/bikeshop_project/core/migrations/0011_auto_20160531_0233.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.9.4 on 2016-05-31 02:33 +from __future__ import unicode_literals + +from django.conf import settings +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + dependencies = [ + ('core', '0010_membership_member'), + ] + + operations = [ + migrations.AlterField( + model_name='membership', + name='member', + field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='memberships', to=settings.AUTH_USER_MODEL), + ), + ] diff --git a/bikeshop_project/core/models.py b/bikeshop_project/core/models.py index 13be195..61a91c3 100644 --- a/bikeshop_project/core/models.py +++ b/bikeshop_project/core/models.py @@ -15,10 +15,10 @@ class Membership(models.Model): blank=False, null=True ) - member = models.OneToOneField( + member = models.ForeignKey( 'registration.Member', on_delete=models.CASCADE, - related_name='membership', + related_name='memberships', blank=True, null=True )