From 64f66d7e157ab6e8bd7d4a0f1fb2bd5d824620e7 Mon Sep 17 00:00:00 2001 From: wudongze Date: Mon, 15 Jul 2024 16:04:52 +0800 Subject: [PATCH] add core app --- app/app/settings.py | 8 ++++---- app/core/__init__.py | 0 app/core/admin.py | 3 +++ app/core/apps.py | 6 ++++++ app/core/migrations/__init__.py | 0 app/core/models.py | 3 +++ app/core/tests.py | 3 +++ app/core/views.py | 3 +++ docker-compose.yml | 2 +- 9 files changed, 23 insertions(+), 5 deletions(-) create mode 100644 app/core/__init__.py create mode 100644 app/core/admin.py create mode 100644 app/core/apps.py create mode 100644 app/core/migrations/__init__.py create mode 100644 app/core/models.py create mode 100644 app/core/tests.py create mode 100644 app/core/views.py diff --git a/app/app/settings.py b/app/app/settings.py index 89ad978..7f73f3d 100644 --- a/app/app/settings.py +++ b/app/app/settings.py @@ -76,10 +76,10 @@ DATABASES = { 'default': { 'ENGINE': 'django.db.backends.postgresql', - 'HOST': os.environment.get('DB_HOST'), - 'NAME': os.environment.get('DB_NAME'), - 'USER': os.environment.get('DB_USER'), - 'PASSWORD': os.environment.get('DB_PASS'), + 'HOST': os.environ.get('DB_HOST'), + 'NAME': os.environ.get('DB_NAME'), + 'USER': os.environ.get('DB_USER'), + 'PASSWORD': os.environ.get('DB_PASS'), } } diff --git a/app/core/__init__.py b/app/core/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/app/core/admin.py b/app/core/admin.py new file mode 100644 index 0000000..8c38f3f --- /dev/null +++ b/app/core/admin.py @@ -0,0 +1,3 @@ +from django.contrib import admin + +# Register your models here. diff --git a/app/core/apps.py b/app/core/apps.py new file mode 100644 index 0000000..8115ae6 --- /dev/null +++ b/app/core/apps.py @@ -0,0 +1,6 @@ +from django.apps import AppConfig + + +class CoreConfig(AppConfig): + default_auto_field = 'django.db.models.BigAutoField' + name = 'core' diff --git a/app/core/migrations/__init__.py b/app/core/migrations/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/app/core/models.py b/app/core/models.py new file mode 100644 index 0000000..71a8362 --- /dev/null +++ b/app/core/models.py @@ -0,0 +1,3 @@ +from django.db import models + +# Create your models here. diff --git a/app/core/tests.py b/app/core/tests.py new file mode 100644 index 0000000..7ce503c --- /dev/null +++ b/app/core/tests.py @@ -0,0 +1,3 @@ +from django.test import TestCase + +# Create your tests here. diff --git a/app/core/views.py b/app/core/views.py new file mode 100644 index 0000000..91ea44a --- /dev/null +++ b/app/core/views.py @@ -0,0 +1,3 @@ +from django.shortcuts import render + +# Create your views here. diff --git a/docker-compose.yml b/docker-compose.yml index 1ccb2bd..9c19da1 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -16,7 +16,7 @@ services: - DB_HOST=db - DB_NAME=devdb - DB_USER=devuser - - DB_PASSWORD=changeme + - DB_PASS=changeme depends_on: - db