Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions intex/intex/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,24 @@
from pathlib import Path
import os
from getpass import getpass
from dotenv import load_dotenv
import dj_database_url

# Build paths inside the project like this: BASE_DIR / 'subdir'.
BASE_DIR = Path(__file__).resolve().parent.parent

load_dotenv(os.path.join(BASE_DIR, ".env"))

# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/4.1/howto/deployment/checklist/

# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = 'django-insecure-d_=5s(h(+q7%4$pkd0&(pr*w9=ml702ff2phs+5sf214w1jav_'
SECRET_KEY = os.getenv("SECRET_KEY")


# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True

ALLOWED_HOSTS = []
ALLOWED_HOSTS = ["*"]


# Application definition
Expand All @@ -53,6 +56,7 @@
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
'whitenoise.middleware.WhiteNoiseMiddleware',
]

ROOT_URLCONF = 'intex.urls'
Expand All @@ -79,15 +83,10 @@
# Database
# https://docs.djangoproject.com/en/4.1/ref/settings/#databases

DATABASE_URL = os.getenv("DATABASE_URL")

DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql',
'NAME': 'kidneyfoundation',
'USER': 'postgres',
'PASSWORD': 'postgres',
'HOST': 'localhost',
}
"default": dj_database_url.config(default=DATABASE_URL, conn_max_age=1800),
}

# Password validation
Expand Down Expand Up @@ -123,7 +122,7 @@

# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/4.1/howto/static-files/

DISABLE_COLLECTSTATIC = 0
STATIC_ROOT = os.path.join(BASE_DIR, 'static')
STATIC_URL = '/static/'
STATICFILES_DIRS = [
Expand All @@ -134,3 +133,4 @@
# https://docs.djangoproject.com/en/4.1/ref/settings/#default-auto-field

DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'

19 changes: 19 additions & 0 deletions intex/kidneyfoundation/migrations/0003_alter_entry_time.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Generated by Django 4.1.3 on 2022-12-02 01:32

import datetime
from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('kidneyfoundation', '0002_alter_entry_time'),
]

operations = [
migrations.AlterField(
model_name='entry',
name='time',
field=models.TimeField(default=datetime.time(18, 32, 57, 816671)),
),
]