added Company model, switched backend config to postgis

This commit is contained in:
Sam
2021-01-21 11:37:54 +00:00
parent 21e05fd14d
commit 77e279423e
4 changed files with 46 additions and 3 deletions

View File

@@ -11,7 +11,7 @@ ALLOWED_HOSTS = []
# Databases configuration
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'ENGINE': 'django.contrib.gis.db.backends.postgis',
'NAME': os.getenv('DB_NAME'),
'USER': os.getenv('DB_USER'),
'PASSWORD': os.getenv('DB_PASSWORD'),
@@ -19,3 +19,6 @@ DATABASES = {
'PORT': os.getenv('DB_PORT'),
},
}
MEDIA_ROOT = BASE_DIR + '/media/'
MEDIA_URL = '/media/'

View File

@@ -15,7 +15,10 @@ Including another URLconf
"""
from django.contrib import admin
from django.urls import path
from django.conf.urls.static import static
from django.conf import settings
urlpatterns = [
path('admin/', admin.site.urls),
]
] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)