From 067fe6670955756395fe06462882de1b9895126b Mon Sep 17 00:00:00 2001 From: VHS Date: Thu, 14 Dec 2023 19:38:18 +0100 Subject: [PATCH 1/4] Fixed loading initial removing duplicate unique values. --- demo/example/foo/fixtures/initial_data.json | 4 ---- 1 file changed, 4 deletions(-) diff --git a/demo/example/foo/fixtures/initial_data.json b/demo/example/foo/fixtures/initial_data.json index a61ba611..899050d3 100644 --- a/demo/example/foo/fixtures/initial_data.json +++ b/demo/example/foo/fixtures/initial_data.json @@ -74,7 +74,6 @@ "visible": true, "description": "Most recommended", "created": "2012-05-05T15:36:31Z", - "default": false, "customized": null, "order": 1, "name": "Premium" @@ -88,7 +87,6 @@ "visible": true, "description": "Professional plan", "created": "2012-07-12T13:07:23Z", - "default": false, "customized": null, "order": 2, "name": "PRO" @@ -102,7 +100,6 @@ "visible": true, "description": "Custom for test1", "created": "2012-07-12T17:33:30.112Z", - "default": false, "customized": 1, "order": 4, "name": "Custom" @@ -116,7 +113,6 @@ "visible": true, "description": "Custom test 2", "created": "2012-07-24T12:51:57.438Z", - "default": false, "customized": 2, "order": 5, "name": "Custom 2" From 5cda751e275c1651a6c6e29bb1ea64e5323f548a Mon Sep 17 00:00:00 2001 From: VHS Date: Thu, 14 Dec 2023 19:38:45 +0100 Subject: [PATCH 2/4] Changed demo to sqlite3 to easy and quick deployment. --- demo/example/settings.py | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/demo/example/settings.py b/demo/example/settings.py index e4e43789..b25000f5 100644 --- a/demo/example/settings.py +++ b/demo/example/settings.py @@ -23,14 +23,9 @@ MANAGERS = ADMINS DATABASES = { - "default": { - "ENGINE": "django.db.backends.postgresql", - # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'. - "NAME": "postgres", # Or path to database file if using sqlite3. - "USER": "postgres", # Not used with sqlite3. - "PASSWORD": "postgres", # Not used with sqlite3. - "HOST": "localhost", # Set to empty string for localhost. Not used with sqlite3. - "PORT": "5432", # Set to empty string for default. Not used with sqlite3. + 'default': { + 'ENGINE': 'django.db.backends.sqlite3', + 'NAME': BASE_DIR / "db.sqlite3", } } From 4df83f534eb951de265521f5d61dc4a5bf2675cc Mon Sep 17 00:00:00 2001 From: VHS Date: Thu, 14 Dec 2023 19:39:25 +0100 Subject: [PATCH 3/4] Add django-plans and removed psycopg2 dependencies --- demo/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/demo/requirements.txt b/demo/requirements.txt index f4bb26ae..6ed3d1e8 100644 --- a/demo/requirements.txt +++ b/demo/requirements.txt @@ -11,10 +11,10 @@ model_bakery django-concurrent-test-helper freezegun flake8 -psycopg2 internet-sabotage3>=0.1.6 django_coverage_plugin swapper +django-plans # Not supported in py3 From 564e16d862a7a9b32f565dad9d30a52627bc9c0d Mon Sep 17 00:00:00 2001 From: Victor Hugo dos Santos Date: Fri, 15 Dec 2023 13:28:28 +0100 Subject: [PATCH 4/4] Fixed wrong db path --- demo/example/settings.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/demo/example/settings.py b/demo/example/settings.py index b25000f5..1bfe91fe 100644 --- a/demo/example/settings.py +++ b/demo/example/settings.py @@ -25,7 +25,7 @@ DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', - 'NAME': BASE_DIR / "db.sqlite3", + 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'), } }