Skip to content

Commit

Permalink
Merge pull request #4 from commoncode/feature/add-person-model
Browse files Browse the repository at this point in the history
Added a person model
  • Loading branch information
Simeon J Morgan authored Aug 11, 2022
2 parents 398b152 + 309fceb commit 93990d1
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 1 deletion.
31 changes: 31 additions & 0 deletions src/community_db/migrations/0001_initial.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Generated by Django 4.1 on 2022-08-11 02:58

from django.db import migrations, models


class Migration(migrations.Migration):

initial = True

dependencies = []

operations = [
migrations.CreateModel(
name="Person",
fields=[
(
"id",
models.BigAutoField(
auto_created=True,
primary_key=True,
serialize=False,
verbose_name="ID",
),
),
("first_name", models.CharField(max_length=100)),
("last_name", models.CharField(blank=True, max_length=100)),
("country", models.CharField(blank=True, max_length=100)),
("mobile_number", models.CharField(blank=True, max_length=20)),
],
),
]
7 changes: 6 additions & 1 deletion src/community_db/models.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
from django.db import models

# Create your models here.

class Person(models.Model):
first_name = models.CharField(max_length=100)
last_name = models.CharField(max_length=100, blank=True)
country = models.CharField(max_length=100, blank=True)
mobile_number = models.CharField(max_length=20, blank=True)

0 comments on commit 93990d1

Please sign in to comment.