WIP: New WaitingListEntry
This commit is contained in:
parent
d31f62ebb4
commit
2317138111
4
.gitignore
vendored
4
.gitignore
vendored
|
@ -8,3 +8,7 @@ db.sqlite3
|
|||
.env
|
||||
venv/
|
||||
.venv/
|
||||
|
||||
|
||||
# collectstatic
|
||||
src/static/
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
default_language_version:
|
||||
python: python3.12
|
||||
python: python3
|
||||
exclude: ^.*\b(migrations)\b.*$
|
||||
repos:
|
||||
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||
|
|
|
@ -0,0 +1,32 @@
|
|||
# Generated by Django 5.0.6 on 2024-07-14 16:22
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('membership', '0005_member'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='WaitingListEntry',
|
||||
fields=[
|
||||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('modified', models.DateTimeField(auto_now=True, verbose_name='modified')),
|
||||
('created', models.DateTimeField(auto_now_add=True, verbose_name='created')),
|
||||
('email', models.EmailField(max_length=254)),
|
||||
('geography', models.CharField(blank=True, null=True, verbose_name='geography')),
|
||||
('comment', models.TextField(blank=True)),
|
||||
],
|
||||
options={
|
||||
'verbose_name': 'waiting list entry',
|
||||
'verbose_name_plural': 'waiting list entries',
|
||||
},
|
||||
),
|
||||
migrations.AlterModelOptions(
|
||||
name='membership',
|
||||
options={'verbose_name': 'medlemskab', 'verbose_name_plural': 'medlemskaber'},
|
||||
),
|
||||
]
|
|
@ -111,3 +111,18 @@ class MembershipType(CreatedModifiedAbstract):
|
|||
|
||||
def __str__(self) -> str:
|
||||
return self.name
|
||||
|
||||
|
||||
class WaitingListEntry(CreatedModifiedAbstract):
|
||||
"""People who for some reason could want to be added to a waiting list and invited to join later."""
|
||||
|
||||
email = models.EmailField()
|
||||
geography = models.CharField(verbose_name=_("geography"), blank=True, null=True)
|
||||
comment = models.TextField(blank=True)
|
||||
|
||||
def __str__(self) -> str:
|
||||
return self.email
|
||||
|
||||
class Meta:
|
||||
verbose_name = _("waiting list entry")
|
||||
verbose_name_plural = _("waiting list entries")
|
||||
|
|
Loading…
Reference in a new issue