From c4379dc6a70ec17a1b42d3c5fcf400783fcef7ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cristi=20V=C3=AEjdea?= Date: Wed, 10 Jan 2018 10:18:22 +0100 Subject: [PATCH] Run testproj in a Heroku demo app (#38) * Add Heroku configuration * Add links in API description * Read database connection string from DATABASE_URL environment variable * Restructure settings files for production * Run server using gunicorn and servce static files with whitenoise * Install drf-yasg from source instead of pypi in testproj * Add readme links to demo app --- .gitignore | 1 + .idea/drf-yasg.iml | 4 +-- .travis.yml | 2 +- Procfile | 2 ++ README.rst | 5 +++ app.json | 17 +++++++++ docs/conf.py | 2 +- requirements.txt | 1 + requirements/dev.txt | 3 ++ requirements/heroku.txt | 9 +++++ requirements/testproj.txt | 2 ++ requirements/tox.txt | 2 -- runtime.txt | 1 + setup.py | 32 ++++++++++++----- src/drf_yasg/inspectors/field.py | 6 ++-- testproj/createsuperuser.py | 10 ++++-- testproj/manage.py | 2 +- testproj/requirements.txt | 5 +-- testproj/testproj/settings/__init__.py | 0 .../{settings.py => settings/base.py} | 31 ++++++---------- testproj/testproj/settings/heroku.py | 35 +++++++++++++++++++ testproj/testproj/settings/local.py | 24 +++++++++++++ testproj/testproj/urls.py | 24 ++++++++++++- testproj/testproj/wsgi.py | 2 +- tests/reference.yaml | 6 +++- tox.ini | 10 +++--- 26 files changed, 188 insertions(+), 50 deletions(-) create mode 100644 Procfile create mode 100644 app.json create mode 100644 requirements.txt create mode 100644 requirements/heroku.txt create mode 100644 runtime.txt create mode 100644 testproj/testproj/settings/__init__.py rename testproj/testproj/{settings.py => settings/base.py} (85%) create mode 100644 testproj/testproj/settings/heroku.py create mode 100644 testproj/testproj/settings/local.py diff --git a/.gitignore b/.gitignore index be34809..0dffda8 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ node_modules/ testproj/db.sqlite3 +testproj/staticfiles .vscode/ # Created by .ignore support plugin (hsz.mobi) diff --git a/.idea/drf-yasg.iml b/.idea/drf-yasg.iml index cab41e2..c0ef6ba 100644 --- a/.idea/drf-yasg.iml +++ b/.idea/drf-yasg.iml @@ -4,7 +4,7 @@