Skip to content

Commit

Permalink
Migrate to ctlsettings
Browse files Browse the repository at this point in the history
  • Loading branch information
nikolas committed Oct 25, 2023
1 parent 5fad646 commit d3ffac8
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 47 deletions.
7 changes: 2 additions & 5 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,12 @@ boto3>=1.12.0,<1.29.0
python-dateutil==2.8.2

python-cas==1.6.0
git+https://github.com/django-cas-ng/django-cas-ng.git
django-cas-ng==5.0.1
django-indexer==0.3.0
django-templatetag-sugar==1.0
django-paging==0.2.5
django-annoying==0.10.6
django-appconf==1.0.5
rcssmin==1.1.0 # django-compressor
rjsmin==1.2.0 # django-compressor
django-compressor>=3.1,<5.0
django-statsd-mozilla==0.4.0
raven==6.10.0
sentry-sdk==1.32.0
Expand All @@ -77,7 +74,7 @@ gunicorn==21.2.0
django-storages==1.13.2
djangorestframework==3.14.0

ccnmtlsettings==1.9.5
ctlsettings==0.2.0

django-reversion==5.0.1
text_unidecode==1.3
Expand Down
19 changes: 0 additions & 19 deletions writlarge/s3utils.py

This file was deleted.

2 changes: 1 addition & 1 deletion writlarge/settings_compose.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# flake8: noqa
from settings_shared import *
from ccnmtlsettings.compose import common
from ctlsettings.compose import common

locals().update(
common(
Expand Down
2 changes: 1 addition & 1 deletion writlarge/settings_docker.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# flake8: noqa
from settings_shared import *
from ccnmtlsettings.docker import common
from ctlsettings.docker import common
import os

locals().update(
Expand Down
3 changes: 2 additions & 1 deletion writlarge/settings_production.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import sys
from django.conf import settings
from writlarge.settings_shared import * # noqa: F403
from ccnmtlsettings.production import common
from ctlsettings.production import common
import sentry_sdk
from sentry_sdk.integrations.django import DjangoIntegration

Expand All @@ -11,6 +11,7 @@
base=base, # noqa: F405
STATIC_ROOT=STATIC_ROOT, # noqa: F405
INSTALLED_APPS=INSTALLED_APPS, # noqa: F405
s3prefix="ccnmtl",
))

CSRF_COOKIE_SECURE = True
Expand Down
16 changes: 1 addition & 15 deletions writlarge/settings_shared.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,28 +3,14 @@
import os.path
import platform
import sys
from ccnmtlsettings.shared import common
from ctlsettings.shared import common


project = 'writlarge'
base = os.path.dirname(__file__)

locals().update(common(project=project, base=base))

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',
}

if hasattr(platform, "linux_distribution") and \
platform.linux_distribution()[0] == 'Ubuntu':
if platform.linux_distribution()[1] == '18.04':
Expand Down
3 changes: 2 additions & 1 deletion writlarge/settings_staging.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import sys
from django.conf import settings
from writlarge.settings_shared import * # noqa: F403
from ccnmtlsettings.staging import common
from ctlsettings.staging import common
import sentry_sdk
from sentry_sdk.integrations.django import DjangoIntegration

Expand All @@ -11,6 +11,7 @@
base=base, # noqa: F405
STATIC_ROOT=STATIC_ROOT, # noqa: F405
INSTALLED_APPS=INSTALLED_APPS, # noqa: F405
s3prefix="ccnmtl",
))

DATABASES = {
Expand Down
6 changes: 2 additions & 4 deletions writlarge/templates/base.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% load compress bootstrap4 %}
{% load bootstrap4 %}
<!DOCTYPE html>
<html lang="en">
<head>
Expand All @@ -22,9 +22,7 @@
<!-- Backup Google font, Questrial -->
<link href="https://fonts.googleapis.com/css?family=Didact+Gothic" rel="stylesheet">

{% compress css %}
<link href="{{STATIC_URL}}css/main.css" rel="stylesheet">
{% endcompress %}
<link href="{{STATIC_URL}}css/main.css" rel="stylesheet">

{% block css %}
{% endblock %}
Expand Down

0 comments on commit d3ffac8

Please sign in to comment.