Commit 3d03daa5 authored by adietmue's avatar adietmue
Browse files

Backend: Re-organize code, improve Dockerfile, add script for demo data

- Code is now in subdirectory to separate from dockerfile etc.
- script to fill dev container with data now works remotely
- settings accepts more input from environment for better config
parent b6eaf916
...@@ -11,7 +11,7 @@ from datetime import datetime as dt, timedelta ...@@ -11,7 +11,7 @@ from datetime import datetime as dt, timedelta
import requests import requests
AMIVAPI_DEV_URL = "https://amiv-api.ethz.ch" AMIVAPI_DEV_URL = "https://amiv-api.ethz.ch"
PVK_DEV_URL = 'http://pvk-api-dev.amiv.ethz.ch' PVK_DEV_URL = 'http://localhost:8080' # 'http://pvk-api-dev.amiv.ethz.ch'
DATE_FORMAT = "%Y-%m-%dT%H:%M:%SZ" DATE_FORMAT = "%Y-%m-%dT%H:%M:%SZ"
ASSISTANTS = ['pablo', 'assi', 'anon', 'mongo'] ASSISTANTS = ['pablo', 'assi', 'anon', 'mongo']
...@@ -34,7 +34,6 @@ def post(resource, data, token): ...@@ -34,7 +34,6 @@ def post(resource, data, token):
response = requests.post('%s/%s' % (PVK_DEV_URL, resource), response = requests.post('%s/%s' % (PVK_DEV_URL, resource),
json=data, json=data,
headers={'Authorization': token}) headers={'Authorization': token})
print(response)
data = response.json() data = response.json()
if response.status_code != 201: if response.status_code != 201:
......
Supports Markdown
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