Skip to content
This repository has been archived by the owner on Dec 13, 2022. It is now read-only.

Commit

Permalink
Merge pull request #230 from open-contracting/dotenv
Browse files Browse the repository at this point in the history
Stop reading from .env file
  • Loading branch information
jpmckinney committed Mar 31, 2021
2 parents 3a4df48 + e8bfea7 commit 9c3a9b6
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 34 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,27 +19,27 @@ Initialize the database:

```shell
createdb covid19_test
env DB_NAME=covid19_test ./manage.py migrate
./manage.py migrate
```

Create a superuser:

```shell
env DB_NAME=covid19_test ./manage.py createsuperuser
./manage.py createsuperuser
```

Load test data:

```shell
env DB_NAME=covid19_test ./manage.py loaddata country redflag equitycategory equitykeywords
./manage.py loaddata country redflag equitycategory equitykeywords
```

## Tasks

Run a development server:

```shell
env DEBUG=True DB_NAME=covid19_test ./manage.py runserver
env DEBUG=True ./manage.py runserver
```

To add, remove or upgrade a requirement, [follow these instructions](https://ocp-software-handbook.readthedocs.io/en/latest/python/applications.html#requirements).
26 changes: 0 additions & 26 deletions covidadmin/.env.example

This file was deleted.

7 changes: 3 additions & 4 deletions covidadmin/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,22 +17,21 @@
import sentry_sdk
from sentry_sdk.integrations.django import DjangoIntegration

environ.Env.read_env()
env = environ.Env(
# set casting, default value
SECRET_KEY=(str, "ig0(igk8+n76thmh-@%*n4bc1ra3sq-#x)kx6bqf&zdh9n1*+8"),
DEBUG=(bool, False),
ALLOWED_HOSTS=(list, []),
DB_ENGINE=(str, "django.db.backends.postgresql_psycopg2"),
DB_NAME=(str, ""),
DB_NAME=(str, "covid19"),
DB_USER=(str, ""),
DB_PASSWORD=(str, ""),
DB_HOST=(str, "127.0.0.1"),
DB_HOST=(str, "localhost"),
DB_PORT=(int, 5432),
STATIC_URL=(str, "/static/"),
FORCE_SCRIPT_NAME=(str, "/"),
CORS_ORIGIN_WHITELIST=(list, []),
CELERY_BROKER_URL=(str, "pyamqp://localhost/"),
CELERY_BROKER_URL=(str, "pyamqp://guest@localhost/"),
CELERY_TIMEZONE=(str, "UTC"),
FETCH_COVID_DATA_INTERVAL=(int, 10800),
GOOGLE_SHEET_CREDENTIALS_JSON=(str, ""),
Expand Down

0 comments on commit 9c3a9b6

Please sign in to comment.