mirror of
https://github.com/mediacms-io/mediacms.git
synced 2025-10-06 22:32:41 +07:00
Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f4ab60e894 | ||
|
|
8656b40c5b | ||
|
|
553a25a86f | ||
|
|
1c1af489f1 | ||
|
|
c4c5ecf06a | ||
|
|
725cc71960 | ||
|
|
0c1c5bbb09 |
1
.gitignore
vendored
1
.gitignore
vendored
@@ -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/
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -1 +1 @@
|
||||
VERSION = "6.7.0"
|
||||
VERSION = "6.7.1"
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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"))
|
||||
|
||||
19
rbac/migrations/0003_alter_rbacgroup_members.py
Normal file
19
rbac/migrations/0003_alter_rbacgroup_members.py
Normal 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),
|
||||
),
|
||||
]
|
||||
@@ -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">
|
||||
|
||||
@@ -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: {
|
||||
|
||||
Reference in New Issue
Block a user