Skip to content

Commit

Permalink
Merge pull request #91 from gm3dmo/tables
Browse files Browse the repository at this point in the history
Adding forms for cemeteries
  • Loading branch information
gm3dmo authored Nov 2, 2023
2 parents d94a554 + 97ccd96 commit 699fa94
Show file tree
Hide file tree
Showing 22 changed files with 1,061 additions and 100 deletions.
18 changes: 17 additions & 1 deletion cmp/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@
from django import forms

from .models import CustomUser

from .models import Country
from .models import Rank
from .models import Cemetery

class CustomUserCreationForm(UserCreationForm):
class Meta:
Expand All @@ -16,7 +19,20 @@ class Meta:
fields = ("email",)


class editCemeteryForm(forms.ModelForm):
class Meta:
model = Cemetery
fields = "__all__"


class editCountryForm(forms.ModelForm):
class Meta:
model = Country
fields = "__all__"
fields = "__all__"


class editRankForm(forms.ModelForm):
class Meta:
model = Rank
fields = "__all__"

30 changes: 30 additions & 0 deletions cmp/migrations/0002_country.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Generated by Django 4.2.5 on 2023-10-14 19:33

from django.db import migrations, models


class Migration(migrations.Migration):
dependencies = [
("cmp", "0001_initial"),
]

operations = [
migrations.CreateModel(
name="Country",
fields=[
(
"id",
models.BigAutoField(
auto_created=True,
primary_key=True,
serialize=False,
verbose_name="ID",
),
),
("name", models.CharField(max_length=50)),
("old_id", models.IntegerField(blank=True, null=True)),
("alpha2", models.CharField(max_length=2)),
("alpha3", models.CharField(max_length=3)),
],
),
]
Loading

0 comments on commit 699fa94

Please sign in to comment.