Skip to content

Commit 9f4b22d

Browse files
committed
files API
1 parent 5c2999c commit 9f4b22d

File tree

21 files changed

+1122
-45
lines changed

21 files changed

+1122
-45
lines changed

.envs/.local/.django

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@
33
USE_DOCKER=yes
44
IPYTHONDIR=/app/.ipython
55
DJANGO_JWT_SECRET=ILIKEASCREThowlongdoesitNeedtTOBeHey
6+
DJANGO_FILE_STORAGE_PATH=/tmp/django-file-storage

Pipfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ scipy = "*"
2222
python-jose = "*"
2323
tabulate = "*"
2424
django-environ = "*"
25+
boto3 = "*"
26+
datalake-common-dtkav = "*"
2527

2628
[dev-packages]
2729
pylint = "*"

Pipfile.lock

Lines changed: 85 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cli/psql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
COMPOSE_ENV=${COMPOSE_ENV:-local.yml}
33
CMD='PGPASSWORD=$POSTGRES_PASSWORD psql -h $POSTGRES_HOST -U $POSTGRES_USER -p $POSTGRES_PORT $POSTGRES_DB'
44

5-
docker-compose -f $COMPOSE_ENV run --rm postgres \
5+
docker-compose -f $COMPOSE_ENV exec postgres \
66
bash -c "$CMD"

config/settings/base.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@
7474
LOCAL_APPS = [
7575
# Your stuff: custom apps go here
7676
'home',
77+
'datalake',
7778
]
7879
# https://docs.djangoproject.com/en/dev/ref/settings/#installed-apps
7980
INSTALLED_APPS = DJANGO_APPS + THIRD_PARTY_APPS + LOCAL_APPS
@@ -279,3 +280,5 @@ def immutable_file_test(path, url):
279280

280281

281282
WHITENOISE_IMMUTABLE_FILE_TEST = immutable_file_test
283+
284+
FILE_STORAGE_PATH = env.str('DJANGO_FILE_STORAGE_PATH')

config/settings/test.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,3 +53,4 @@
5353

5454
# Your stuff...
5555
# ------------------------------------------------------------------------------
56+
FILE_STORAGE_PATH = 's3://bucketname/django-file-storage/'

local.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ services:
2020
ports:
2121
- "8000:8000"
2222
command: /start
23+
restart: always
2324

2425
frontend:
2526
build:

missioncontrol/api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ def object_does_not_exist(exception):
1919

2020

2121
def validation_error(exception):
22-
problem = connexion.problem(400, "Validation Error", str(exception))
22+
problem = connexion.problem(400, "Validation Error", exception.messages)
2323
return connexion.FlaskApi.get_response(problem)
2424

2525

missioncontrol/datalake/__init__.py

Whitespace-only changes.

missioncontrol/datalake/admin.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
from django.contrib import admin
2+
from django import forms
3+
from . import models
4+
5+
admin.site.register(models.What)
6+
admin.site.register(models.RelatedFile)

0 commit comments

Comments
 (0)