Skip to content

Commit

Permalink
Merge pull request #4 from sown/2023-12-28-maintenance
Browse files Browse the repository at this point in the history
2023 12 28 maintenance
  • Loading branch information
trickeydan authored Dec 28, 2023
2 parents 542a05c + 720b7d2 commit b3415db
Show file tree
Hide file tree
Showing 8 changed files with 32 additions and 14 deletions.
9 changes: 6 additions & 3 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
SECRET_KEY=django-insecure-rT1fjisdfhsdfsiof3fsdfjs9d0fwqe78(UO-X^FPe

OIDC_RP_CLIENT_ID=YourClientIdHere
OIDC_RP_CLIENT_SECRET=YourClientSecretHere
SSO_OIDC_CONFIGURATION_URL=https://sso.example.com/.well-known/openid-configuration
SSO_OIDC_CLIENT_ID=YourClientIdHere
SSO_OIDC_CLIENT_SECRET=YourClientSecretHere
SSO_STAFF_GROUP_NAME=kmicms:staff
SSO_SUPERUSER_GROUP_NAME=kmicms:superuser

DISCORD_APP_CLIENT_ID=123
DISCORD_APP_CLIENT_SECRET=secret
DISCORD_APP_CLIENT_SECRET=secret

NETBOX_API_TOKEN=abc
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
python: [3.9, "3.10", "3.11", "3.12"]
python: ["3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python }}
Expand Down
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,17 @@ You need to create a `.env` file containing the secrets:

```
SECRET_KEY=django-insecure-rT1fjisdfhsdfsiof3fsdfjs9d0fwqe78(UO-X^FPe
SSO_OIDC_CONFIGURATION_URL=https://sso.example.com/.well-known/openid-configuration
SSO_OIDC_CLIENT_ID=YourClientIdHere
SSO_OIDC_CLIENT_SECRET=YourClientSecretHere
SSO_STAFF_GROUP_NAME=kmicms:staff
SSO_SUPERUSER_GROUP_NAME=kmicms:superuser
DISCORD_APP_CLIENT_ID=123
DISCORD_APP_CLIENT_SECRET=secret
NETBOX_API_TOKEN=abc
```

There is an example of this file: `.env.example`
Expand Down
2 changes: 1 addition & 1 deletion kmicms/core/templatetags/brand.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def static_for_brand(parser: Any, token: Any) -> str:
Usage::
{% static path [as varname] %}
{% static_for_brand path [as varname] %}
Examples::
Expand Down
16 changes: 10 additions & 6 deletions kmicms/kmicms/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
BASE_DIR = os.path.dirname(PROJECT_DIR)

# Validate Python version
if parse_version(platform.python_version()) < parse_version("3.9.0"): # pragma: nocover
if parse_version(platform.python_version()) < parse_version("3.10.0"): # pragma: nocover
raise RuntimeError(
f"SOWN CMS requires Python 3.9 or higher (current: Python {platform.python_version()})",
f"KMI-CMS requires Python 3.10 or higher (current: Python {platform.python_version()})",
)

#
Expand Down Expand Up @@ -231,9 +231,6 @@
# https://docs.djangoproject.com/en/4.2/topics/i18n/

USE_I18N = True

USE_L10N = True

USE_TZ = True

MESSAGE_TAGS = {
Expand Down Expand Up @@ -262,7 +259,14 @@
# ManifestStaticFilesStorage is recommended in production, to prevent outdated
# JavaScript / CSS assets being served from cache (e.g. after a Wagtail upgrade).
# See https://docs.djangoproject.com/en/4.2/ref/contrib/staticfiles/#manifeststaticfilesstorage
STATICFILES_STORAGE = "django.contrib.staticfiles.storage.ManifestStaticFilesStorage"
STORAGES = {
"default": {
"BACKEND": "django.core.files.storage.FileSystemStorage",
},
"staticfiles": {
"BACKEND": "django.contrib.staticfiles.storage.ManifestStaticFilesStorage",
},
}

STATIC_ROOT = os.path.join(BASE_DIR, "static")
STATIC_URL = "/static/"
Expand Down
2 changes: 1 addition & 1 deletion kmicms/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tool.ruff]
target-version = "py39"
target-version = "py310"
line-length = 120

select = [
Expand Down
2 changes: 1 addition & 1 deletion requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ coverage[toml]==7.3.2
# via pytest-cov
crispy-bootstrap5==2023.10
# via -r requirements.txt
cryptography==41.0.5
cryptography==41.0.6
# via
# -r requirements.txt
# authlib
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ charset-normalizer==3.3.2
# via requests
crispy-bootstrap5==2023.10
# via -r requirements.in
cryptography==41.0.5
cryptography==41.0.6
# via authlib
defusedxml==0.7.1
# via willow
Expand Down

0 comments on commit b3415db

Please sign in to comment.