Create model signature
This commit is contained in:
parent
56f5e53dca
commit
abc77818a1
2 changed files with 29 additions and 1 deletions
22
petition/migrations/0001_initial.py
Normal file
22
petition/migrations/0001_initial.py
Normal 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)),
|
||||
],
|
||||
),
|
||||
]
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue