From 7b891b3d921236310a13c51d816bd5802f1db4e1 Mon Sep 17 00:00:00 2001 From: sm4640 Date: Sat, 31 May 2025 00:49:27 +0900 Subject: [PATCH 1/6] =?UTF-8?q?=E2=9E=95=20Dependency:=20[#63]=20mongoengi?= =?UTF-8?q?ne=20=EC=84=A4=EC=B9=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- requirements.txt | Bin 1858 -> 1970 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/requirements.txt b/requirements.txt index 5d5421685265c22dc6fbfdf786213ac16dcfaf16..40309160a31e377dcabc191be8a64d86d0a97c1c 100644 GIT binary patch delta 105 zcmX@aw~2p)3A1zxLmophLjgl2LkU9$Lq3pa3xq}tdJN{1wV7Wl=7Po2fn+LBE}bD0 kNT!0-7y#86F<5TqWzl66MJNMlHvvi+G8k{xWff%t0KBLal>h($ delta 21 dcmdnQe~52`3G?I#=0}@TSX3A{uVUq30svN`2K4{{ From d29fe92cfd96e1944608fca0857078762e2ab2f1 Mon Sep 17 00:00:00 2001 From: sm4640 Date: Sat, 31 May 2025 00:55:13 +0900 Subject: [PATCH 2/6] =?UTF-8?q?=E2=9C=A8=20Feat:=20[#63]=20=EB=85=B8?= =?UTF-8?q?=EC=BD=94=EB=93=9C=ED=88=B4=20=EC=95=B1=20=EC=B6=94=EA=B0=80,?= =?UTF-8?q?=20MONGODB=20=EC=A0=95=EB=B3=B4=20env=EB=A1=9C=20=EB=B6=88?= =?UTF-8?q?=EB=9F=AC=EC=98=A4=EA=B8=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/settings.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/config/settings.py b/config/settings.py index dd50230..a407419 100644 --- a/config/settings.py +++ b/config/settings.py @@ -65,6 +65,7 @@ INSTALLED_APPS = [ 'projects', 'codes', 'notifications', + 'nocodetools', ] MIDDLEWARE = [ @@ -102,6 +103,9 @@ WSGI_APPLICATION = 'config.wsgi.application' # Database # https://docs.djangoproject.com/en/5.1/ref/settings/#databases +MONGODB_URI = env("MONGODB_URI") +MONGODB_NAME = env('MONGODB_NAME') + DATABASES = { 'default': { 'ENGINE': 'django.db.backends.postgresql', From 9e56e6abf12b5fa6677058a6af6f5034c5e81505 Mon Sep 17 00:00:00 2001 From: sm4640 Date: Sat, 31 May 2025 00:55:41 +0900 Subject: [PATCH 3/6] =?UTF-8?q?=E2=9C=A8=20Feat:=20[#63]=20mongoDB=20?= =?UTF-8?q?=EC=97=B0=EB=8F=99=20=EC=84=A4=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- common/utils/mongodb.py | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 common/utils/mongodb.py diff --git a/common/utils/mongodb.py b/common/utils/mongodb.py new file mode 100644 index 0000000..80dc3cc --- /dev/null +++ b/common/utils/mongodb.py @@ -0,0 +1,8 @@ +import mongoengine +from django.conf import settings + +def connect_colio_mongo(): + mongoengine.connect( + db=settings.MONGODB_NAME, + host=settings.MONGODB_URI + ) \ No newline at end of file From 40e9af078a9b8db4a191205e3ae87f31645a4be0 Mon Sep 17 00:00:00 2001 From: sm4640 Date: Sat, 31 May 2025 00:56:15 +0900 Subject: [PATCH 4/6] =?UTF-8?q?=E2=9C=A8=20Feat:=20[#63]=20mongoDB=20?= =?UTF-8?q?=EC=97=B0=EB=8F=99=20=EC=84=A4=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nocodetools/apps.py | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 nocodetools/apps.py diff --git a/nocodetools/apps.py b/nocodetools/apps.py new file mode 100644 index 0000000..58fae68 --- /dev/null +++ b/nocodetools/apps.py @@ -0,0 +1,9 @@ +from django.apps import AppConfig +from common.utils.mongodb import connect_colio_mongo + +class NocodetoolsConfig(AppConfig): + # default_auto_field = 'django.db.models.BigAutoField' + name = 'nocodetools' + + def ready(self): + connect_colio_mongo() From 615a218d970b4d1f6d837a98fb33778bbdace4f8 Mon Sep 17 00:00:00 2001 From: sm4640 Date: Sat, 31 May 2025 00:56:43 +0900 Subject: [PATCH 5/6] =?UTF-8?q?=E2=9C=A8=20Feat:=20[#63]=20=EB=85=B8?= =?UTF-8?q?=EC=BD=94=EB=93=9C=ED=88=B4=20=EC=95=B1=20=EC=83=9D=EC=84=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nocodetools/__init__.py | 0 nocodetools/admin.py | 3 +++ nocodetools/tests.py | 3 +++ nocodetools/views.py | 1 + 4 files changed, 7 insertions(+) create mode 100644 nocodetools/__init__.py create mode 100644 nocodetools/admin.py create mode 100644 nocodetools/tests.py create mode 100644 nocodetools/views.py diff --git a/nocodetools/__init__.py b/nocodetools/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/nocodetools/admin.py b/nocodetools/admin.py new file mode 100644 index 0000000..8c38f3f --- /dev/null +++ b/nocodetools/admin.py @@ -0,0 +1,3 @@ +from django.contrib import admin + +# Register your models here. diff --git a/nocodetools/tests.py b/nocodetools/tests.py new file mode 100644 index 0000000..7ce503c --- /dev/null +++ b/nocodetools/tests.py @@ -0,0 +1,3 @@ +from django.test import TestCase + +# Create your tests here. diff --git a/nocodetools/views.py b/nocodetools/views.py new file mode 100644 index 0000000..d43f642 --- /dev/null +++ b/nocodetools/views.py @@ -0,0 +1 @@ +# views.py From 324cb0718e85841c5060f184f393c7d3312bf904 Mon Sep 17 00:00:00 2001 From: sm4640 Date: Sat, 31 May 2025 00:57:06 +0900 Subject: [PATCH 6/6] =?UTF-8?q?=E2=9C=A8=20Feat:=20[#63]=20=EB=85=B8?= =?UTF-8?q?=EC=BD=94=EB=93=9C=ED=88=B4=20=EA=B3=A0=EC=A0=95=20=EC=8A=A4?= =?UTF-8?q?=ED=82=A4=EB=A7=88=20=EC=84=A4=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nocodetools/models.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 nocodetools/models.py diff --git a/nocodetools/models.py b/nocodetools/models.py new file mode 100644 index 0000000..0213803 --- /dev/null +++ b/nocodetools/models.py @@ -0,0 +1,14 @@ +from django.db import models + +import mongoengine as me + +class Element(me.EmbeddedDocument): + element_type = me.StringField() + content = me.StringField() + css = me.DictField() + +class Page(me.Document): + cut = me.IntField() + elements = me.ListField(me.EmbeddedDocumentField(Element)) + created_at = me.DateTimeField() + updated_at = me.DateTimeField() \ No newline at end of file