Tablas hechas

This commit is contained in:
2023-02-20 05:10:30 +01:00
parent 5747cd9213
commit 0573c4e99c
15 changed files with 141 additions and 16 deletions

View File

@@ -1,3 +1,4 @@
from django.contrib import admin
from lista.models import Lista
# Register your models here.
admin.site.register(Lista)

View File

@@ -0,0 +1,21 @@
# Generated by Django 4.1.7 on 2023-02-20 03:31
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Lista',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('nombre', models.CharField(max_length=200)),
],
),
]

View File

@@ -1,3 +1,8 @@
from django.db import models
# Create your models here.
class Lista(models.Model):
nombre = models.CharField(max_length=200, null=False, blank=False)
def __str__(self):
return f"<{self.nombre}>"