Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
AlekSIS-Core
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Service Desk
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
AlekSIS®
Official
AlekSIS-Core
Commits
d5bcc1df
Verified
Commit
d5bcc1df
authored
3 years ago
by
Jonathan Weth
Browse files
Options
Downloads
Patches
Plain Diff
Move favicon files to the public directory to make them accessible without a titofisto token
parent
49e9ddbf
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!747
Resolve "Caching issues"
Pipeline
#38094
canceled
3 years ago
Stage: test
Stage: build
Stage: publish
Stage: docker
Stage: deploy
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
aleksis/core/migrations/0021_public_favicon.py
+27
-0
27 additions, 0 deletions
aleksis/core/migrations/0021_public_favicon.py
aleksis/core/settings.py
+1
-0
1 addition, 0 deletions
aleksis/core/settings.py
with
28 additions
and
0 deletions
aleksis/core/migrations/0021_public_favicon.py
0 → 100644
+
27
−
0
View file @
d5bcc1df
# Generated by Django 3.2.4 on 2021-07-24 13:14
import
os
from
django.db
import
migrations
,
models
import
django.db.models.deletion
class
Migration
(
migrations
.
Migration
):
dependencies
=
[
(
'
core
'
,
'
0020_pdf_file_person_optional
'
),
]
def
_migrate_favicons
(
apps
,
schema_editor
):
FaviconImg
=
apps
.
get_model
(
'
favicon
'
,
"
FaviconImg
"
)
for
favicon_img
in
FaviconImg
.
objects
.
all
():
old_name
=
favicon_img
.
faviconImage
.
name
new_name
=
os
.
path
.
join
(
"
public
"
,
old_name
)
storage
=
favicon_img
.
faviconImage
.
storage
if
storage
.
exists
(
old_name
):
storage
.
save
(
new_name
,
favicon_img
.
faviconImage
.
file
)
favicon_img
.
faviconImage
.
name
=
new_name
favicon_img
.
save
()
operations
=
[
migrations
.
RunPython
(
_migrate_favicons
)
]
This diff is collapsed.
Click to expand it.
aleksis/core/settings.py
+
1
−
0
View file @
d5bcc1df
...
...
@@ -635,6 +635,7 @@ PWA_ICONS_CONFIG = {
"
apple_splash
"
:
[
192
],
"
microsoft
"
:
[
144
],
}
FAVICON_PATH
=
os
.
path
.
join
(
"
public
"
,
"
favicon
"
)
SERVICE_WORKER_PATH
=
os
.
path
.
join
(
STATIC_ROOT
,
"
js
"
,
"
serviceworker.js
"
)
...
...
This diff is collapsed.
Click to expand it.
Jonathan Weth
@hansegucker
mentioned in commit
1591518a
·
3 years ago
mentioned in commit
1591518a
mentioned in commit 1591518acf2a277c1eb4e9611f1b3a4419c26a19
Toggle commit list
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment