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
|
if [[ ! -d "$PGDATA" ]]; then
|
||||||
initdb
|
initdb
|
||||||
echo -e "listen_addresses = 'localhost'\nunix_socket_directories = '$PGHOST'" >> "$PGDATA/postgresql.conf"
|
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
|
fi
|
||||||
}
|
}
|
||||||
layout postgres
|
layout postgres
|
||||||
|
|
|
@ -28,7 +28,7 @@ CRISPY_FAIL_SILENTLY = not DEBUG
|
||||||
DATABASES = {
|
DATABASES = {
|
||||||
"default": {
|
"default": {
|
||||||
"ENGINE": "django.db.backends.postgresql",
|
"ENGINE": "django.db.backends.postgresql",
|
||||||
"NAME": os.environ.get("USER"),
|
"NAME": "django",
|
||||||
"USER": os.environ.get("USER"),
|
"USER": os.environ.get("USER"),
|
||||||
"HOST": "localhost",
|
"HOST": "localhost",
|
||||||
"PORT": 5432,
|
"PORT": 5432,
|
||||||
|
|
Loading…
Reference in New Issue