Skip to content

Commit

Permalink
Update from ccnmtlsettings to ctlsettings
Browse files Browse the repository at this point in the history
  • Loading branch information
Evan-CTL committed Dec 1, 2023
1 parent 503b6bf commit 3054134
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 33 deletions.
3 changes: 2 additions & 1 deletion carr/settings_production.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from carr.settings_shared import * # noqa F403
from ccnmtlsettings.production import common
from ctlsettings.production import common
from django.conf import settings
import sentry_sdk
from sentry_sdk.integrations.django import DjangoIntegration
Expand All @@ -10,6 +10,7 @@
base=base, # noqa: F405
INSTALLED_APPS=INSTALLED_APPS, # noqa: F405
STATIC_ROOT=STATIC_ROOT, # noqa: F405
s3prefix='ccnmtl',
))

CACHES = {
Expand Down
28 changes: 5 additions & 23 deletions carr/settings_shared.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
import sys
from datetime import timedelta

from ccnmtlsettings.shared import common
from ctlsettings.shared import common
project = 'carr'
base = os.path.dirname(__file__)
locals().update(common(project=project, base=base))
locals().update(common(project=project, base=base, s3prefix='ccnmtl',))

CACHES = {
'default': {
Expand All @@ -32,37 +32,22 @@
'carr.someutils.AuthRequirementMiddleware',
'djangohelpers.middleware.HttpDeleteMiddleware',
'carr.middleware.SiteIdMiddleware',
'django.middleware.csrf.CsrfViewMiddleware'
'django.middleware.csrf.CsrfViewMiddleware',
]

CAS_SERVER_URL = 'https://cas.columbia.edu/cas/'
CAS_VERSION = '3'
CAS_ADMIN_REDIRECT = False
CAS_MAP_AFFILIATIONS = True

# Translate CUIT's CAS user attributes to the Django user model.
# https://cuit.columbia.edu/content/cas-3-ticket-validation-response
CAS_APPLY_ATTRIBUTES_TO_USER = True
CAS_RENAME_ATTRIBUTES = {
'givenName': 'first_name',
'lastName': 'last_name',
'mail': 'email',
}

INSTALLED_APPS += [ # noqa
'carr.activity_bruise_recon',
'carr.activity_taking_action',
'django_cas_ng',
'pageblocks',
'pagetree',
'carr.carr_main',
'carr.quiz',
'sorl.thumbnail',
'courseaffils',
'bootstrap3',
'lti_provider'
'lti_provider',
'django_markwhat',
]
INSTALLED_APPS.remove('djangowind')

PROJECT_APPS = [
'carr.carr_main',
Expand Down Expand Up @@ -113,9 +98,6 @@
SITE_DENTAL = 1
SITE_SOCIAL_WORK = 2

TEMPLATES[0]['OPTIONS']['context_processors'].remove( # noqa
'djangowind.context.context_processor')

TEMPLATES[0]['OPTIONS']['context_processors'].append( # noqa
'carr.carr_main.views.context_processor',
)
Expand Down
3 changes: 2 additions & 1 deletion carr/settings_staging.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from carr.settings_shared import * # noqa F403
from ccnmtlsettings.staging import common
from ctlsettings.staging import common
from django.conf import settings
import sentry_sdk
from sentry_sdk.integrations.django import DjangoIntegration
Expand All @@ -10,6 +10,7 @@
base=base, # noqa: F405
STATIC_ROOT=STATIC_ROOT, # noqa: F405
INSTALLED_APPS=INSTALLED_APPS, # noqa: F405
s3prefix='ccnmtl',
))

CACHES = {
Expand Down
3 changes: 0 additions & 3 deletions carr/templates/base.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{% load compress %}
{% load bootstrap3 %}
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
Expand All @@ -8,9 +7,7 @@
<title>CARE: {% block title %}{% endblock %}</title>
{% bootstrap_css %}

{% compress css %}
<link rel="stylesheet" href="{{ STATIC_URL }}css/main.css" media="screen" />
{% endcompress %}
{% if IS_SOCIALWORK %}
<link rel="stylesheet" href="{{STATIC_URL}}css/ssw.css" media="screen" />
{% else %}
Expand Down
1 change: 1 addition & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 2 additions & 5 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ charset-normalizer==3.3.0
requests==2.31.0

python-cas==1.6.0
django-cas-ng==5.0.0
django-cas-ng==5.0.1
requirements/src/sorl-3.3-py2.py3-none-any.whl
requirements/src/pagetree-0.7.3-py2.py3-none-any.whl
requirements/src/django_pageblocks-0.5.17-py3-none-any.whl
Expand All @@ -55,7 +55,6 @@ text-unidecode==1.3
Faker==20.1.0

factory_boy==3.3.0
django-waffle==4.0.0
django-markwhat==1.6.2
django-impersonate==1.9.1
django-ga-context==0.1.0
Expand All @@ -64,7 +63,6 @@ django-debug-toolbar==4.2.0
gunicorn==21.2.0

django-appconf==1.0.5
django-compressor>=3.1,<5.0
django-stagingcontext==0.1.0
certifi==2023.11.17 # sentry-sdk
urllib3==2.1.0 # sentry-sdk
Expand All @@ -77,12 +75,11 @@ botocore>=1.15.0,<1.34.0
python-dateutil==2.8.2
django-storages==1.13.2

django-cacheds3storage==0.3.0
# memcached
pylibmc==1.6.3; sys_platform == 'linux'
django-smtp-ssl==1.0

ccnmtlsettings==1.9.5
ctlsettings==0.2.0
django-bootstrap3==23.4

pbr==6.0.0
Expand Down

0 comments on commit 3054134

Please sign in to comment.