diff --git a/api/__pycache__/settings.cpython-312.pyc b/api/__pycache__/settings.cpython-312.pyc index 9de78854..28958eac 100644 Binary files a/api/__pycache__/settings.cpython-312.pyc and b/api/__pycache__/settings.cpython-312.pyc differ diff --git a/api/settings.py b/api/settings.py index 32b12399..3be27995 100644 --- a/api/settings.py +++ b/api/settings.py @@ -21,7 +21,7 @@ BASE_DIR = Path(__file__).resolve().parent.parent SECRET_KEY = 'django-insecure-_u202k$8qq2p*cr_eo(7k!0ngr5^n)27@85+5oy8&41(u6&j54' # SECURITY WARNING: don't run with debug turned on in production! -DEBUG = False +DEBUG = True ALLOWED_HOSTS = ['*'] @@ -81,8 +81,8 @@ ASGI_APPLICATION = 'api.asgi.application' # https://docs.djangoproject.com/en/4.1/ref/settings/#databases #prod:5.223.52.193 dev:5.223.42.146 -MODE = 'prod' -DBHOST = '172.17.0.1' if MODE == 'prod' else '5.223.52.193' +MODE = 'dev' +DBHOST = '172.17.0.1' if MODE == 'prod' else '5.223.42.146' DATABASES = { 'default': { diff --git a/app/__pycache__/models.cpython-312.pyc b/app/__pycache__/models.cpython-312.pyc index 2af8f8f3..8ed75ef9 100644 Binary files a/app/__pycache__/models.cpython-312.pyc and b/app/__pycache__/models.cpython-312.pyc differ diff --git a/app/migrations/0358_people_issued_place.py b/app/migrations/0358_people_issued_place.py new file mode 100644 index 00000000..e8508a85 --- /dev/null +++ b/app/migrations/0358_people_issued_place.py @@ -0,0 +1,19 @@ +# Generated by Django 5.1.7 on 2026-01-18 17:27 + +import django.db.models.deletion +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('app', '0357_discount_type_method'), + ] + + operations = [ + migrations.AddField( + model_name='people', + name='issued_place', + field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.PROTECT, related_name='+', to='app.issued_place'), + ), + ] diff --git a/app/models.py b/app/models.py index fda50e41..66b8a868 100644 --- a/app/models.py +++ b/app/models.py @@ -1190,6 +1190,16 @@ class Country(models.Model): db_table = 'country' +class Issued_Place(models.Model): + code = models.CharField(max_length=30, null=True, unique=True) + name = models.CharField(max_length=100, null=False) + create_time = models.DateTimeField(null=True, auto_now_add=True) + update_time = models.DateTimeField(null=True, auto_now=True) + + class Meta: + db_table = 'issued_place' + + class Company(AutoCodeModel): code_prefix = "CP" code_padding = 5 @@ -1226,6 +1236,7 @@ class People(AutoCodeModel): legal_type = models.ForeignKey(Legal_Type, null=True, related_name='+', on_delete=models.PROTECT) legal_code = models.CharField(max_length=20, null=True) issued_date = models.DateField(null=True) + issued_place = models.ForeignKey(Issued_Place, null=True, related_name='+', on_delete=models.PROTECT) address = models.CharField(max_length=200, null=True) contact_address = models.CharField(max_length=200, null=True) taxcode = models.CharField(max_length=100, null=True) @@ -1274,16 +1285,6 @@ class Document_Audit(models.Model): db_table = 'document_audit' -class Issued_Place(models.Model): - code = models.CharField(max_length=30, null=True, unique=True) - name = models.CharField(max_length=100, null=False) - create_time = models.DateTimeField(null=True, auto_now_add=True) - update_time = models.DateTimeField(null=True, auto_now=True) - - class Meta: - db_table = 'issued_place' - - class Transaction_Phase(models.Model): code = models.CharField(max_length=30, null=True, unique=True) name = models.CharField(max_length=100, null=False)