Support deletion of users.
This commit is contained in:
parent
7f7dfcd748
commit
5eb4444e1d
19
drakul/users/migrations/0005_auto_20191121_1646.py
Normal file
19
drakul/users/migrations/0005_auto_20191121_1646.py
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
# Generated by Django 2.2.6 on 2019-11-21 16:46
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
import django.db.models.deletion
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('users', '0004_auto_20191121_0109'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='user',
|
||||||
|
name='main',
|
||||||
|
field=models.OneToOneField(blank=True, on_delete=django.db.models.deletion.CASCADE, related_name='+', to='users.Character'),
|
||||||
|
),
|
||||||
|
]
|
|
@ -33,7 +33,7 @@ class User(AbstractUser):
|
||||||
main = models.OneToOneField(
|
main = models.OneToOneField(
|
||||||
"Character",
|
"Character",
|
||||||
related_name="+",
|
related_name="+",
|
||||||
on_delete=models.PROTECT,
|
on_delete=models.CASCADE,
|
||||||
blank=True
|
blank=True
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue