From c529ff1a5ff2475281e57cd61aa987b0ed792495 Mon Sep 17 00:00:00 2001 From: Jochen Mehlich Date: Wed, 29 Nov 2023 18:29:43 +0100 Subject: [PATCH] added model for sourcePerson Signed-off-by: Jochen Mehlich --- .idea/.gitignore | 8 +++++ .../inspectionProfiles/profiles_settings.xml | 6 ++++ .idea/misc.xml | 7 +++++ .idea/modules.xml | 8 +++++ .idea/quoteMe.iml | 29 +++++++++++++++++++ .idea/vcs.xml | 6 ++++ quoteMe/settings.py | 1 + sourcePerson/__init__.py | 0 sourcePerson/admin.py | 3 ++ sourcePerson/apps.py | 6 ++++ sourcePerson/migrations/0001_initial.py | 25 ++++++++++++++++ .../migrations/0002_auto_20231129_1829.py | 25 ++++++++++++++++ sourcePerson/migrations/__init__.py | 0 sourcePerson/models.py | 13 +++++++++ sourcePerson/tests.py | 3 ++ sourcePerson/views.py | 3 ++ 16 files changed, 143 insertions(+) create mode 100644 .idea/.gitignore create mode 100644 .idea/inspectionProfiles/profiles_settings.xml create mode 100644 .idea/misc.xml create mode 100644 .idea/modules.xml create mode 100644 .idea/quoteMe.iml create mode 100644 .idea/vcs.xml create mode 100644 sourcePerson/__init__.py create mode 100644 sourcePerson/admin.py create mode 100644 sourcePerson/apps.py create mode 100644 sourcePerson/migrations/0001_initial.py create mode 100644 sourcePerson/migrations/0002_auto_20231129_1829.py create mode 100644 sourcePerson/migrations/__init__.py create mode 100644 sourcePerson/models.py create mode 100644 sourcePerson/tests.py create mode 100644 sourcePerson/views.py diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000..13566b8 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,8 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Editor-based HTTP Client requests +/httpRequests/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml diff --git a/.idea/inspectionProfiles/profiles_settings.xml b/.idea/inspectionProfiles/profiles_settings.xml new file mode 100644 index 0000000..105ce2d --- /dev/null +++ b/.idea/inspectionProfiles/profiles_settings.xml @@ -0,0 +1,6 @@ + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000..5396ca5 --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,7 @@ + + + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..eefee65 --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/quoteMe.iml b/.idea/quoteMe.iml new file mode 100644 index 0000000..0214946 --- /dev/null +++ b/.idea/quoteMe.iml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..35eb1dd --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/quoteMe/settings.py b/quoteMe/settings.py index c6719e7..433510e 100644 --- a/quoteMe/settings.py +++ b/quoteMe/settings.py @@ -38,6 +38,7 @@ INSTALLED_APPS = [ 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', + 'sourcePerson' ] MIDDLEWARE = [ diff --git a/sourcePerson/__init__.py b/sourcePerson/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/sourcePerson/admin.py b/sourcePerson/admin.py new file mode 100644 index 0000000..8c38f3f --- /dev/null +++ b/sourcePerson/admin.py @@ -0,0 +1,3 @@ +from django.contrib import admin + +# Register your models here. diff --git a/sourcePerson/apps.py b/sourcePerson/apps.py new file mode 100644 index 0000000..a981cfe --- /dev/null +++ b/sourcePerson/apps.py @@ -0,0 +1,6 @@ +from django.apps import AppConfig + + +class SourcepersonConfig(AppConfig): + default_auto_field = 'django.db.models.BigAutoField' + name = 'sourcePerson' diff --git a/sourcePerson/migrations/0001_initial.py b/sourcePerson/migrations/0001_initial.py new file mode 100644 index 0000000..6bce57b --- /dev/null +++ b/sourcePerson/migrations/0001_initial.py @@ -0,0 +1,25 @@ +# Generated by Django 3.2.18 on 2023-11-29 17:26 + +from django.db import migrations, models +import uuid + + +class Migration(migrations.Migration): + + initial = True + + dependencies = [ + ] + + operations = [ + migrations.CreateModel( + name='sourcePerson', + fields=[ + ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)), + ('name', models.CharField(max_length=200)), + ('isActive', models.BooleanField(default=True)), + ('isArchived', models.BooleanField(default=False)), + ('description', models.TextField()), + ], + ), + ] diff --git a/sourcePerson/migrations/0002_auto_20231129_1829.py b/sourcePerson/migrations/0002_auto_20231129_1829.py new file mode 100644 index 0000000..e84d26c --- /dev/null +++ b/sourcePerson/migrations/0002_auto_20231129_1829.py @@ -0,0 +1,25 @@ +# Generated by Django 3.2.18 on 2023-11-29 17:29 + +import datetime +from django.db import migrations, models +from django.utils.timezone import utc + + +class Migration(migrations.Migration): + + dependencies = [ + ('sourcePerson', '0001_initial'), + ] + + operations = [ + migrations.AddField( + model_name='sourceperson', + name='created_at', + field=models.DateTimeField(default=datetime.datetime(2023, 11, 29, 17, 29, 16, 298686, tzinfo=utc)), + ), + migrations.AddField( + model_name='sourceperson', + name='updated_at', + field=models.DateTimeField(default=datetime.datetime(2023, 11, 29, 17, 29, 16, 298700, tzinfo=utc)), + ), + ] diff --git a/sourcePerson/migrations/__init__.py b/sourcePerson/migrations/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/sourcePerson/models.py b/sourcePerson/models.py new file mode 100644 index 0000000..bb4852b --- /dev/null +++ b/sourcePerson/models.py @@ -0,0 +1,13 @@ +from django.db import models +from django.utils import timezone +import uuid +# Create your models here. + +class sourcePerson(models.Model): + id = models.UUIDField(primary_key=True, default=uuid.uuid4, editable=False) + name = models.CharField(max_length=200) + isActive = models.BooleanField(default=True) + isArchived = models.BooleanField(default=False) + description = models.TextField() + created_at = models.DateTimeField(default=timezone.now()) + updated_at = models.DateTimeField(default=timezone.now()) \ No newline at end of file diff --git a/sourcePerson/tests.py b/sourcePerson/tests.py new file mode 100644 index 0000000..7ce503c --- /dev/null +++ b/sourcePerson/tests.py @@ -0,0 +1,3 @@ +from django.test import TestCase + +# Create your tests here. diff --git a/sourcePerson/views.py b/sourcePerson/views.py new file mode 100644 index 0000000..91ea44a --- /dev/null +++ b/sourcePerson/views.py @@ -0,0 +1,3 @@ +from django.shortcuts import render + +# Create your views here.