added Company model, switched backend config to postgis
This commit is contained in:
@@ -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/'
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user