Create a django database
This commit is contained in:
parent
05c61e275a
commit
3860b94c0b
2
.envrc
2
.envrc
|
@ -6,7 +6,7 @@ layout_postgres() {
|
|||
if [[ ! -d "$PGDATA" ]]; then
|
||||
initdb
|
||||
echo -e "listen_addresses = 'localhost'\nunix_socket_directories = '$PGHOST'" >> "$PGDATA/postgresql.conf"
|
||||
echo "CREATE DATABASE $USER;" | postgres --single -E postgres
|
||||
echo "CREATE DATABASE django;" | postgres --single -E postgres
|
||||
fi
|
||||
}
|
||||
layout postgres
|
||||
|
|
|
@ -28,7 +28,7 @@ CRISPY_FAIL_SILENTLY = not DEBUG
|
|||
DATABASES = {
|
||||
"default": {
|
||||
"ENGINE": "django.db.backends.postgresql",
|
||||
"NAME": os.environ.get("USER"),
|
||||
"NAME": "django",
|
||||
"USER": os.environ.get("USER"),
|
||||
"HOST": "localhost",
|
||||
"PORT": 5432,
|
||||
|
|
Loading…
Reference in New Issue