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
99a7006c
Commit
99a7006c
authored
2 years ago
by
Julian
Browse files
Options
Downloads
Patches
Plain Diff
Add direct url for site logo
parent
8d20bd50
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!1123
Resolve "Finalise Vuetify app as SPA"
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
aleksis/core/urls.py
+1
-0
1 addition, 0 deletions
aleksis/core/urls.py
aleksis/core/views.py
+11
-0
11 additions, 0 deletions
aleksis/core/views.py
with
12 additions
and
0 deletions
aleksis/core/urls.py
+
1
−
0
View file @
99a7006c
...
...
@@ -24,6 +24,7 @@ urlpatterns = [
path
(
settings
.
MEDIA_URL
.
removeprefix
(
"
/
"
),
include
(
"
titofisto.urls
"
)),
path
(
"
__icons__/
"
,
include
(
"
dj_iconify.urls
"
)),
path
(
"
graphql/
"
,
csrf_exempt
(
GraphQLView
.
as_view
(
graphiql
=
True
)),
name
=
"
graphql
"
),
path
(
"
logo
"
,
views
.
LogoView
.
as_view
(),
name
=
"
logo
"
),
path
(
"
django/
"
,
include
(
...
...
This diff is collapsed.
Click to expand it.
aleksis/core/views.py
+
11
−
0
View file @
99a7006c
...
...
@@ -23,6 +23,7 @@ from django.http import (
)
from
django.shortcuts
import
get_object_or_404
,
redirect
,
render
from
django.template
import
loader
from
django.templatetags.static
import
static
from
django.urls
import
reverse
,
reverse_lazy
from
django.utils
import
timezone
from
django.utils.decorators
import
method_decorator
...
...
@@ -137,6 +138,16 @@ from .util.forms import PreferenceLayout
from
.util.pdf
import
render_pdf
class
LogoView
(
View
):
def
get
(
self
,
request
:
HttpRequest
,
*
args
,
**
kwargs
)
->
HttpResponse
:
image
=
request
.
site
.
preferences
[
"
theme__logo
"
]
if
image
:
image
=
image
.
url
else
:
image
=
static
(
"
img/aleksis-banner.svg
"
)
return
redirect
(
image
)
class
RenderPDFView
(
TemplateView
):
"""
View to render a PDF file from a template.
...
...
This diff is collapsed.
Click to expand it.
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