Verified Commit b6e769a5 authored by David Haynes's avatar David Haynes 🙆
Browse files

Add in GeoDjango support

- modify the db engine
- new package req's
- Modify the Docker build process
parent eb81dac2
...@@ -8,7 +8,7 @@ ENV PYTHONUNBUFFERED 1 ...@@ -8,7 +8,7 @@ ENV PYTHONUNBUFFERED 1
# Update the sources list # Update the sources list
RUN apt-get update RUN apt-get update
RUN apt-get install netcat -y RUN apt-get install netcat libgdal1h libproj-dev proj-data proj-bin -y
RUN mkdir /whats_open RUN mkdir /whats_open
WORKDIR /whats_open WORKDIR /whats_open
......
...@@ -7,4 +7,5 @@ mysqlclient==1.3.10 ...@@ -7,4 +7,5 @@ mysqlclient==1.3.10
setuptools==36.0.1 setuptools==36.0.1
django-taggit==0.22.1 django-taggit==0.22.1
django-taggit-serializer==0.1.5 django-taggit-serializer==0.1.5
six==1.10.0 six==1.10.0
\ No newline at end of file djangorestframework-gis==0.11.2
\ No newline at end of file
...@@ -126,7 +126,7 @@ FIXTURE_DIRS = ( ...@@ -126,7 +126,7 @@ FIXTURE_DIRS = (
# See: https://docs.djangoproject.com/en/dev/ref/settings/#databases # See: https://docs.djangoproject.com/en/dev/ref/settings/#databases
DATABASES = { DATABASES = {
'default': { 'default': {
'ENGINE': 'django.db.backends.mysql', 'ENGINE': 'django.contrib.gis.db.backends.mysql',
'NAME': os.environ['WOPEN_DB_NAME'], 'NAME': os.environ['WOPEN_DB_NAME'],
'USER': os.environ['WOPEN_DB_USER'], 'USER': os.environ['WOPEN_DB_USER'],
'PASSWORD': os.environ['WOPEN_DB_PASSWORD'], 'PASSWORD': os.environ['WOPEN_DB_PASSWORD'],
...@@ -221,6 +221,7 @@ INSTALLED_APPS = ( ...@@ -221,6 +221,7 @@ INSTALLED_APPS = (
# Admin panel and documentation: # Admin panel and documentation:
'django.contrib.admin', 'django.contrib.admin',
'django.contrib.admindocs', 'django.contrib.admindocs',
'django.contrib.gis',
# Apps specific for this project go here. # Apps specific for this project go here.
'api', 'api',
...@@ -229,6 +230,7 @@ INSTALLED_APPS = ( ...@@ -229,6 +230,7 @@ INSTALLED_APPS = (
'taggit', 'taggit',
'taggit_serializer', 'taggit_serializer',
'rest_framework', 'rest_framework',
'rest_framework_gis',
) )
########## END APP CONFIGURATION ########## END APP CONFIGURATION
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment