Skip to content

Commit

Permalink
first pass
Browse files Browse the repository at this point in the history
  • Loading branch information
barneydobson committed Oct 23, 2024
1 parent 3c6b6f0 commit 4070660
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 7 deletions.
10 changes: 6 additions & 4 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:

1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
Expand All @@ -24,10 +25,11 @@ A clear and concise description of what you expected to happen.
If applicable, add screenshots to help explain your problem.

**System details:**
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Python version [e.g. 3.12]
- Software Versions [release/branch/commit]

- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Python version [e.g. 3.12]
- Software Versions [release/branch/commit]

**Additional context**
Add any other context about the problem here.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ authors = [
{ name = "Adrian D'Alessandro", email = "a.dalessandro@imperial.ac.uk" },
]
requires-python = ">=3.12"
dependencies = ["django"]
dependencies = ["django", "whitenoise"]

[project.optional-dependencies]
dev = [
Expand Down
3 changes: 3 additions & 0 deletions rse_competencies_toolkit/settings/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
"""Django settings for rse_competencies_toolkit project."""

from .settings import * # noqa: F403
19 changes: 19 additions & 0 deletions rse_competencies_toolkit/settings/_production.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
"""Settings for app deployment in production.
This module contains those settings that are not expected to vary between
deployments. This module is not intended to be used directly but imported into another
module where deployment specific settings are set.
ADMINS and ALLOWED_HOSTS need to be defined in the deployment specific settings module.
"""

import os

from .settings import * # noqa: F403

DEBUG = False
SECRET_KEY = os.environ["SECRET_KEY"]
SECURE_BROWSER_XSS_FILTER = True
SECURE_PROXY_SSL_HEADER = ("HTTP_X_FORWARDED_PROTO", "https")
SECURE_HSTS_SECONDS = 15552000
USE_X_FORWARDED_HOST = True
EMAIL_BACKEND = "django.core.mail.backends.smtp.EmailBackend"
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
from pathlib import Path

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


# Quick-start development settings - unsuitable for production
Expand Down Expand Up @@ -75,7 +75,7 @@
DATABASES = {
"default": {
"ENGINE": "django.db.backends.sqlite3",
"NAME": BASE_DIR / "db.sqlite3",
"NAME": BASE_DIR / "db" / "db.sqlite3",
}
}

Expand Down Expand Up @@ -120,3 +120,11 @@
# https://docs.djangoproject.com/en/5.1/ref/settings/#default-auto-field

DEFAULT_AUTO_FIELD = "django.db.models.BigAutoField"


# Custom settings
INSTALLED_APPS += ["main"]


MIDDLEWARE.insert(1, "whitenoise.middleware.WhiteNoiseMiddleware")
STATIC_ROOT = BASE_DIR / "staticfiles"

0 comments on commit 4070660

Please sign in to comment.