7 Commits
v6.7.0 ... main

Author SHA1 Message Date
Markos Gogoulos
f4ab60e894 fix: extend gitignore 2025-09-26 11:33:44 +03:00
Markos Gogoulos
8656b40c5b fix: url 2025-09-25 08:51:26 +03:00
Markos Gogoulos
553a25a86f feat: pass extra css (#1392) 2025-09-24 19:01:06 +03:00
Markos Gogoulos
1c1af489f1 feat: allow portal logo override (#1391) 2025-09-24 16:26:45 +03:00
Markos Gogoulos
c4c5ecf06a update version 2025-09-21 16:18:31 +03:00
Markos Gogoulos
725cc71960 fix migration 2025-09-21 16:17:18 +03:00
Markos Gogoulos
0c1c5bbb09 add new migration 2025-09-21 16:15:46 +03:00
9 changed files with 61 additions and 8 deletions

1
.gitignore vendored
View File

@@ -5,6 +5,7 @@ media_files/original/
media_files/hls/
media_files/chunks/
media_files/uploads/
media_files/tinymce_media/
postgres_data/
celerybeat-schedule
logs/

View File

@@ -105,6 +105,23 @@ USE_L10N = True
USE_TZ = True
SITE_ID = 1
# these are the portal logos (dark and light)
# set new paths for svg or png if you want to override
# svg has priority over png, so if you want to use
# custom pngs and not svgs, remove the lines with svgs
# or set as empty strings
# example:
# PORTAL_LOGO_DARK_SVG = ""
# PORTAL_LOGO_LIGHT_SVG = ""
# place the files on static/images folder
PORTAL_LOGO_DARK_SVG = "/static/images/logo_dark.svg"
PORTAL_LOGO_DARK_PNG = "/static/images/logo_dark.png"
PORTAL_LOGO_LIGHT_SVG = "/static/images/logo_light.svg"
PORTAL_LOGO_LIGHT_PNG = "/static/images/logo_dark.png"
# paths to extra css files to be included, eg "/static/css/custom.css"
# place css inside static/css folder
EXTRA_CSS_PATHS = []
# protection agains anonymous users
# per ip address limit, for actions as like/dislike/report
TIME_TO_ACTION_ANONYMOUS = 10 * 60

View File

@@ -1 +1 @@
VERSION = "6.7.0"
VERSION = "6.7.1"

View File

@@ -240,7 +240,12 @@ Docker Compose installation: edit `deploy/docker/local_settings.py`, make a chan
### 5.1 Change portal logo
Set a new svg file for the white theme (`static/images/logo_dark.svg`) or the dark theme (`static/images/logo_light.svg`)
Find the default svg files for the white theme on `static/images/logo_dark.svg` and for the dark theme on `static/images/logo_light.svg`
You can specify new svg paths to override by editing the `PORTAL_LOGO_DARK_SVG` and `PORTAL_LOGO_LIGHT_SVG` variables in `settings.py`.
You can also use custom pngs, by setting the variables `PORTAL_LOGO_DARK_PNG` and `PORTAL_LOGO_LIGHT_PNG` in `settings.py`. The svg files have priority over png files, so if both are set, svg files will be used.
In any case, make sure the files are placed on the static/images folder.
### 5.2 Set global portal title

View File

@@ -12,6 +12,12 @@ def stuff(request):
ret["FRONTEND_HOST"] = request.build_absolute_uri('/').rstrip('/')
ret["DEFAULT_THEME"] = settings.DEFAULT_THEME
ret["PORTAL_NAME"] = settings.PORTAL_NAME
ret["PORTAL_LOGO_DARK_SVG"] = getattr(settings, 'PORTAL_LOGO_DARK_SVG', "")
ret["PORTAL_LOGO_DARK_PNG"] = getattr(settings, 'PORTAL_LOGO_DARK_PNG', "")
ret["PORTAL_LOGO_LIGHT_SVG"] = getattr(settings, 'PORTAL_LOGO_LIGHT_SVG', "")
ret["PORTAL_LOGO_LIGHT_PNG"] = getattr(settings, 'PORTAL_LOGO_LIGHT_PNG', "")
ret["EXTRA_CSS_PATHS"] = getattr(settings, 'EXTRA_CSS_PATHS', [])
ret["PORTAL_DESCRIPTION"] = settings.PORTAL_DESCRIPTION
ret["LOAD_FROM_CDN"] = settings.LOAD_FROM_CDN
ret["CAN_LOGIN"] = settings.LOGIN_ALLOWED

View File

@@ -115,7 +115,7 @@ urlpatterns = [
if settings.USERS_NEEDS_TO_BE_APPROVED:
urlpatterns.append(re_path(r"^approval_required", views.approval_required, name="approval_required"))
urlpatterns.append(re_path(r"^approval_required/", views.approval_required, name="approval_required"))
if hasattr(settings, "USE_SAML") and settings.USE_SAML:
urlpatterns.append(re_path(r"^saml/metadata", views.saml_metadata, name="saml-metadata"))

View File

@@ -0,0 +1,19 @@
# Generated by Django 5.2.6 on 2025-09-21 11:49
from django.conf import settings
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('rbac', '0002_alter_rbacgroup_uid'),
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
operations = [
migrations.AlterField(
model_name='rbacgroup',
name='members',
field=models.ManyToManyField(related_name='rbac_groups', through='rbac.RBACMembership', through_fields=('rbac_group', 'user'), to=settings.AUTH_USER_MODEL),
),
]

View File

@@ -28,4 +28,9 @@
<link href="{% static "css/_extra.css" %}?v={{ VERSION }}" rel="preload" as="style">
<link href="{% static "css/_extra.css" %}?v={{ VERSION }}" rel="stylesheet">
{% for css_path in EXTRA_CSS_PATHS %}
<link href="{{ css_path }}?v={{ VERSION }}" rel="preload" as="style">
<link href="{{ css_path }}?v={{ VERSION }}" rel="stylesheet">
{% endfor %}
<link href="{% static "js/_commons.js" %}?v={{ VERSION }}" rel="preload" as="script">

View File

@@ -4,19 +4,19 @@ MediaCMS.site = {
url: '{{FRONTEND_HOST}}',
api: '{{FRONTEND_HOST}}/api/v1',
theme: {
mode: '{{DEFAULT_THEME}}',
mode: '{{DEFAULT_THEME}}',
switch: {
position: 'sidebar', // Valid values: 'header', 'sidebar'.
},
},
logo:{
lightMode:{
img: "/static/images/logo_dark.png",
svg: "/static/images/logo_dark.svg",
img: "{{PORTAL_LOGO_DARK_PNG}}",
svg: "{{PORTAL_LOGO_DARK_SVG}}",
},
darkMode:{
img: "/static/images/logo_light.png",
svg: "/static/images/logo_light.svg",
img: "{{PORTAL_LOGO_LIGHT_PNG}}",
svg: "{{PORTAL_LOGO_LIGHT_SVG}}",
},
},
pages: {