Skip to content

Commit e6267dc

Browse files
moved settings around in base
1 parent 66a5394 commit e6267dc

File tree

1 file changed

+38
-66
lines changed

1 file changed

+38
-66
lines changed

hhs_oauth_server/settings/base_modified.py

Lines changed: 38 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,32 @@
1919
# ############################################################################
2020

2121
# ============================================================================
22-
# Project Configuration & Base Paths
22+
# Application Configuration
2323
# ============================================================================
2424

2525
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
2626
BASE_DIR = os.path.join(BASE_DIR, "..")
2727

28+
TEMPLATES = [
29+
{
30+
"BACKEND": "django.template.backends.django.DjangoTemplates",
31+
"DIRS": [os.path.join(BASE_DIR, ("templates/"))],
32+
"APP_DIRS": True,
33+
"OPTIONS": {
34+
"context_processors": [
35+
"django.template.context_processors.debug",
36+
"django.template.context_processors.request",
37+
"django.template.context_processors.i18n",
38+
"django.contrib.auth.context_processors.auth",
39+
"django.contrib.messages.context_processors.messages",
40+
"django_settings_export.settings_export",
41+
"hhs_oauth_server.hhs_oauth_server_context.active_apps",
42+
],
43+
"builtins": [],
44+
},
45+
},
46+
]
47+
2848
# ============================================================================
2949
# Security & Keys
3050
# ============================================================================
@@ -133,29 +153,9 @@
133153
ROOT_URLCONF = "hhs_oauth_server.urls"
134154

135155
# ============================================================================
136-
# Templates / Static Files
156+
# Static / Media Files
137157
# ============================================================================
138158

139-
TEMPLATES = [
140-
{
141-
"BACKEND": "django.template.backends.django.DjangoTemplates",
142-
"DIRS": [os.path.join(BASE_DIR, ("templates/"))],
143-
"APP_DIRS": True,
144-
"OPTIONS": {
145-
"context_processors": [
146-
"django.template.context_processors.debug",
147-
"django.template.context_processors.request",
148-
"django.template.context_processors.i18n",
149-
"django.contrib.auth.context_processors.auth",
150-
"django.contrib.messages.context_processors.messages",
151-
"django_settings_export.settings_export",
152-
"hhs_oauth_server.hhs_oauth_server_context.active_apps",
153-
],
154-
"builtins": [],
155-
},
156-
},
157-
]
158-
159159
WSGI_APPLICATION = "hhs_oauth_server.wsgi.application"
160160

161161
ASSETS_ROOT = env("DJANGO_ASSETS_ROOT", BASE_DIR)
@@ -322,7 +322,7 @@
322322
}
323323

324324
# ============================================================================
325-
# Authentication / Sessions
325+
# Authentication / Sessions / Login
326326
# ============================================================================
327327

328328
AUTH_PROFILE_MODULE = "accounts.UserProfile"
@@ -424,7 +424,7 @@
424424

425425
# ############################################################################
426426
# ############################################################################
427-
# THIRD-PARTY PACKAGE SETTINGS
427+
# PYTHON PACKAGE SETTINGS
428428
# ############################################################################
429429
# ############################################################################
430430

@@ -456,7 +456,7 @@
456456
CORS_ORIGIN_ALLOW_ALL = bool_env(env("CORS_ORIGIN_ALLOW_ALL", True))
457457

458458
# ============================================================================
459-
# django-waffle (Feature Flags)
459+
# django-waffle
460460
# ============================================================================
461461

462462
WAFFLE_FLAG_MODEL = "core.Flag"
@@ -495,18 +495,10 @@
495495
(GRANT_IMPLICIT, _("Implicit")),
496496
)
497497

498-
BENE_PERSONAL_INFO_SCOPES = [
499-
"patient/Patient.read",
500-
"patient/Patient.s",
501-
"patient/Patient.r",
502-
"patient/Patient.rs",
503-
"profile",
504-
]
505-
506498

507499
# ############################################################################
508500
# ############################################################################
509-
# BLUE BUTTON CUSTOM SETTINGS
501+
# BLUE BUTTON SETTINGS
510502
# ############################################################################
511503
# ############################################################################
512504

@@ -561,37 +553,6 @@
561553

562554
DISCLOSURE_TEXT = env("DJANGO_PRIVACY_POLICY_URI", DEFAULT_DISCLOSURE_TEXT)
563555

564-
# ============================================================================
565-
# Settings Export (from django-settings-export)
566-
# ============================================================================
567-
568-
SETTINGS_EXPORT = [
569-
"DEBUG",
570-
"ALLOWED_HOSTS",
571-
"APPLICATION_TITLE",
572-
"THEME",
573-
"STATIC_URL",
574-
"STATIC_ROOT",
575-
"MEDIA_URL",
576-
"MEDIA_ROOT",
577-
"DEVELOPER_DOCS_URI",
578-
"DEVELOPER_DOCS_TITLE",
579-
"ORGANIZATION_TITLE",
580-
"POLICY_URI",
581-
"POLICY_TITLE",
582-
"DISCLOSURE_TEXT",
583-
"TOS_URI",
584-
"TOS_TITLE",
585-
"TAG_LINE_1",
586-
"TAG_LINE_2",
587-
"EXPLAINATION_LINE",
588-
"EXTERNAL_AUTH_NAME",
589-
"ALLOW_END_USER_EXTERNAL_AUTH",
590-
"OPTIONAL_INSTALLED_APPS",
591-
"INSTALLED_APPS",
592-
"LANGUAGE_COOKIE_NAME"
593-
]
594-
595556
# ============================================================================
596557
# Application Config
597558
# ============================================================================
@@ -611,7 +572,7 @@
611572
# TODO - Verify usage, unable to find in code search
612573

613574
# ============================================================================
614-
# FHIR Server Integration
575+
# FHIR Config
615576
# ============================================================================
616577

617578
FHIR_CLIENT_CERTSTORE = env(
@@ -639,17 +600,28 @@
639600
FHIR_POST_SEARCH_PARAM_IDENTIFIER_MBI_HASH = (
640601
"https://bluebutton.cms.gov/resources/identifier/mbi-hash"
641602
)
603+
# TODO - Move to constants
642604

643605
FHIR_POST_SEARCH_PARAM_IDENTIFIER_HICN_HASH = (
644606
"https://bluebutton.cms.gov/resources/identifier/hicn-hash"
645607
)
608+
# TODO - Move to constants
646609

647610
FHIR_PATIENT_SEARCH_PARAM_IDENTIFIER_MBI = (
648611
"http://hl7.org/fhir/sid/us-mbi"
649612
)
613+
# TODO - Move to constants
650614

651615
FHIR_PARAM_FORMAT = "json"
652616

617+
BENE_PERSONAL_INFO_SCOPES = [
618+
"patient/Patient.read",
619+
"patient/Patient.s",
620+
"patient/Patient.r",
621+
"patient/Patient.rs",
622+
"profile",
623+
]
624+
653625
# ============================================================================
654626
# Request Configuration
655627
# ============================================================================

0 commit comments

Comments
 (0)