Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
gosprogrammers committed Jan 22, 2025
2 parents 3628e04 + fbd1051 commit a73a31e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
7 changes: 5 additions & 2 deletions AttendanceV2/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
For the full list of settings and their values, see
https://docs.djangoproject.com/en/5.1/ref/settings/
"""

import os
import dj_database_url
from pathlib import Path

# Build paths inside the project like this: BASE_DIR / 'subdir'.
Expand Down Expand Up @@ -80,7 +81,9 @@
"NAME": BASE_DIR / "db.sqlite3",
}
}

# Update database info if it's in $DATABASE_URL environment variable
db_from_env = dj_database_url.config(conn_max_age=500)
DATABASES["default"].update(db_from_env)

# Password validation
# https://docs.djangoproject.com/en/5.1/ref/settings/#auth-password-validators
Expand Down
4 changes: 3 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
Django~=5.1.4
autoflake~=2.3.1
black~=24.10.0
gspread==6.1.2
dj-database-url==2.1.0
gspread==6.1.2
psycopg2~=2.9.10

0 comments on commit a73a31e

Please sign in to comment.