Fixed 500 error in tests

This commit is contained in:
ITQ
2024-02-28 15:40:56 +03:00
parent b206a71909
commit baa5be9aea
3 changed files with 17 additions and 24 deletions
@@ -1,4 +1,4 @@
# Generated by Django 4.2.10 on 2024-02-27 18:38
# Generated by Django 4.2.10 on 2024-02-28 12:32
from django.db import migrations, models
@@ -20,5 +20,8 @@ class Migration(migrations.Migration):
('alpha3', models.CharField(max_length=3)),
('region', models.CharField()),
],
options={
'db_table': 'countries',
},
),
]
+3
View File
@@ -7,5 +7,8 @@ class Country(models.Model):
alpha3 = models.CharField(max_length=3)
region = models.CharField()
class Meta:
db_table = "countries"
def __str__(self):
return self.name
-13
View File
@@ -1,7 +1,6 @@
import os
from pathlib import Path
import dj_database_url
from dotenv import load_dotenv
load_dotenv()
@@ -61,18 +60,6 @@ TEMPLATES = [
WSGI_APPLICATION = "pulse.wsgi.application"
POSTGRES_CONN = os.getenv("POSTGRES_CONN")
POSTGRES_JDBC_URL = os.getenv("POSTGRES_JDBC_URL")
if POSTGRES_CONN:
DATABASES = {
"default": {
"ENGINE": "django.db.backends.postgresql",
**dj_database_url.parse(POSTGRES_CONN),
},
}
else:
DATABASES = {
"default": {
"ENGINE": "django.db.backends.postgresql",