Changing fk to OneToOne.
parent
cd9149c296
commit
9e0fded98e
|
@ -0,0 +1,20 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import models, migrations
|
||||
from django.conf import settings
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('accounts', '0001_initial'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='userprofile',
|
||||
name='user',
|
||||
field=models.OneToOneField(to=settings.AUTH_USER_MODEL),
|
||||
),
|
||||
]
|
|
@ -42,7 +42,7 @@ class UserProfile(models.Model):
|
|||
)
|
||||
|
||||
# User
|
||||
user = models.ForeignKey(User, unique=True)
|
||||
user = models.OneToOneField(User)
|
||||
is_pro = models.BooleanField(default=False)
|
||||
teams_beta_seen = models.BooleanField(default=False)
|
||||
teams_beta_applied = models.BooleanField(default=False)
|
||||
|
|
Loading…
Reference in New Issue