db model up and running
This commit is contained in:
parent
e74dced19b
commit
99068f64a3
Binary file not shown.
Binary file not shown.
Binary file not shown.
35
website/migrations/0002_registrant.py
Normal file
35
website/migrations/0002_registrant.py
Normal file
@ -0,0 +1,35 @@
|
||||
# Generated by Django 4.2.5 on 2023-10-04 16:54
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('website', '0001_initial'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='Registrant',
|
||||
fields=[
|
||||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('name', models.CharField(max_length=64)),
|
||||
('mail', models.EmailField(max_length=254)),
|
||||
('phone', models.CharField(max_length=21)),
|
||||
('rate_reduced', models.BooleanField()),
|
||||
('address', models.TextField()),
|
||||
('birthdate', models.DateField()),
|
||||
('gender', models.CharField(choices=[('Männlich', 'Männlich'), ('Weiblich', 'Weiblich'), ('Andere', 'Andere')], max_length=32)),
|
||||
('food', models.CharField(choices=[('Vegetarisch', 'Vegetarisch'), ('Vegan', 'Vegan'), ('Glutenfrei', 'Glutenfrei')], max_length=32)),
|
||||
('music', models.CharField(max_length=128)),
|
||||
('cake', models.BooleanField()),
|
||||
('publish_address', models.BooleanField()),
|
||||
('publish_phone', models.BooleanField()),
|
||||
('info', models.CharField(max_length=777)),
|
||||
('message', models.TextField(verbose_name=2100)),
|
||||
('timestamp', models.DateTimeField(auto_now_add=True)),
|
||||
('payed', models.BooleanField()),
|
||||
],
|
||||
),
|
||||
]
|
BIN
website/migrations/__pycache__/0002_registrant.cpython-311.pyc
Normal file
BIN
website/migrations/__pycache__/0002_registrant.cpython-311.pyc
Normal file
Binary file not shown.
@ -45,3 +45,24 @@ class ContactForm(ModelForm):
|
||||
class Meta:
|
||||
model = Contact
|
||||
fields = ["pseudonym", "mail", "betreff", "nachricht"]
|
||||
|
||||
GESCHLECHTER = [("Männlich", "Männlich"), ("Weiblich","Weiblich"),("Andere","Andere")]
|
||||
ERNÄHRUNG = [("Vegetarisch","Vegetarisch"),("Vegan","Vegan"),("Glutenfrei","Glutenfrei")]
|
||||
class Registrant(models.Model):
|
||||
name = models.CharField(max_length=64)
|
||||
mail = models.EmailField()
|
||||
phone = models.CharField(max_length=21)
|
||||
rate_reduced = models.BooleanField()
|
||||
address = models.TextField()
|
||||
birthdate = models.DateField()
|
||||
gender = models.CharField(max_length=32, blank=False, choices=GESCHLECHTER)
|
||||
food = models.CharField(max_length=32, blank=False, choices=ERNÄHRUNG)
|
||||
music = models.CharField(max_length=128)
|
||||
cake = models.BooleanField()
|
||||
publish_address = models.BooleanField()
|
||||
publish_phone = models.BooleanField()
|
||||
info = models.CharField(max_length=777)
|
||||
message = models.TextField(2100)
|
||||
|
||||
timestamp = models.DateTimeField(auto_now_add=True)
|
||||
payed = models.BooleanField()
|
||||
|
Loading…
Reference in New Issue
Block a user