Create a django database

This commit is contained in:
Andreas Zweili 2023-07-14 14:34:56 +02:00
parent 05c61e275a
commit 3860b94c0b
2 changed files with 2 additions and 2 deletions

2
.envrc
View File

@ -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

View File

@ -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,