Create model signature

This commit is contained in:
Théophile Bastian 2018-02-05 21:39:09 +01:00
parent 56f5e53dca
commit abc77818a1
2 changed files with 29 additions and 1 deletions

View File

@ -0,0 +1,22 @@
# Generated by Django 2.0.2 on 2018-02-05 20:38
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Signature',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(max_length=255)),
('mail', models.EmailField(max_length=254)),
],
),
]

View File

@ -1,3 +1,9 @@
from django.db import models
# Create your models here.
class Signature(models.Model):
name = models.CharField(max_length=255)
mail = models.EmailField()
def __str__(self):
return "{} <{}>".format(self.name, self.mail)