Commit 16ac1491 authored by amandazk's avatar amandazk

Revert "Relação pessoas com user"

This reverts commit 4925d213.
parent ac16eed2
# Generated by Django 3.1.3 on 2021-01-14 14:18
# Generated by Django 3.1.3 on 2021-01-04 13:19
from django.db import migrations, models
import django.db.models.deletion
......
# Generated by Django 3.1.3 on 2021-01-14 14:18
# Generated by Django 3.1.3 on 2021-01-04 13:19
from django.db import migrations, models
import django.db.models.deletion
......
# Generated by Django 3.1.3 on 2021-01-14 14:18
# Generated by Django 3.1.3 on 2021-01-04 13:19
from django.db import migrations, models
import django.db.models.deletion
......
# Generated by Django 3.1.3 on 2021-01-14 14:18
# Generated by Django 3.1.3 on 2021-01-04 13:19
from django.db import migrations, models
import django.db.models.deletion
......
# Generated by Django 3.1.3 on 2021-01-14 14:18
# Generated by Django 3.1.3 on 2021-01-04 13:19
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import phonenumber_field.modelfields
......@@ -11,7 +9,6 @@ class Migration(migrations.Migration):
initial = True
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
operations = [
......@@ -32,12 +29,9 @@ class Migration(migrations.Migration):
('pessoa_id', models.AutoField(primary_key=True, serialize=False)),
('cpf_pessoa', models.CharField(max_length=11, unique=True)),
('nome_pessoa', models.CharField(max_length=200)),
('username', models.CharField(max_length=100, unique=True)),
('password', models.CharField(max_length=30)),
('nasc_pessoa', models.DateField()),
('email_pessoa', models.EmailField(max_length=254)),
('fone', models.ManyToManyField(related_name='pessoas', to='pessoas.Fone')),
('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
],
options={
'verbose_name': 'Pessoa',
......
# Generated by Django 3.1.3 on 2021-01-04 13:28
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('pessoas', '0001_initial'),
]
operations = [
migrations.AddField(
model_name='pessoa',
name='password',
field=models.CharField(default='', max_length=30),
preserve_default=False,
),
migrations.AddField(
model_name='pessoa',
name='username',
field=models.CharField(default=' ', max_length=100, unique=True),
preserve_default=False,
),
]
from django.db import models
from django.contrib.auth.models import User
class Pessoa(models.Model):
objects = models.Manager() #evitar erro no vscode
......@@ -16,11 +15,6 @@ class Pessoa(models.Model):
related_name='pessoas'
)
user = models.OneToOneField(
User,
on_delete = models.CASCADE
)
def __str__(self):
return self.nome_pessoa
......
# Generated by Django 3.1.3 on 2021-01-14 14:18
# Generated by Django 3.1.3 on 2021-01-04 13:19
from django.db import migrations, models
......
# Generated by Django 3.1.3 on 2021-01-14 14:18
# Generated by Django 3.1.3 on 2021-01-04 13:19
from django.db import migrations, models
import django.db.models.deletion
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment