Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Maják
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TO
Maják
Commits
b1a9cd61
Commit
b1a9cd61
authored
3 years ago
by
jan.bednarik
Browse files
Options
Downloads
Patches
Plain Diff
majak: Explorer menu sort
parent
d470f289
Branches
Branches containing commit
No related tags found
2 merge requests
!446
Release
,
!445
Menu
Pipeline
#7467
passed
3 years ago
Stage: build
Changes
3
Pipelines
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
elections2021/models.py
+1
-3
1 addition, 3 deletions
elections2021/models.py
majak/settings/base.py
+1
-0
1 addition, 0 deletions
majak/settings/base.py
tuning/wagtail_hooks.py
+8
-1
8 additions, 1 deletion
tuning/wagtail_hooks.py
with
10 additions
and
4 deletions
elections2021/models.py
+
1
−
3
View file @
b1a9cd61
...
@@ -1593,9 +1593,7 @@ class BenefitBlock(blocks.StructBlock):
...
@@ -1593,9 +1593,7 @@ class BenefitBlock(blocks.StructBlock):
template
=
"
elections2021/_benefit_block.html
"
template
=
"
elections2021/_benefit_block.html
"
class
Elections2021ProgramPointPage
(
class
Elections2021ProgramPointPage
(
SubpageMixin
,
MetadataPageMixin
,
Page
):
SubpageMixin
,
MetadataPageMixin
,
Page
,
index
.
Indexed
):
### FIELDS
### FIELDS
annotation
=
RichTextField
(
annotation
=
RichTextField
(
...
...
This diff is collapsed.
Click to expand it.
majak/settings/base.py
+
1
−
0
View file @
b1a9cd61
...
@@ -77,6 +77,7 @@ INSTALLED_APPS = [
...
@@ -77,6 +77,7 @@ INSTALLED_APPS = [
"
django.contrib.messages
"
,
"
django.contrib.messages
"
,
"
django.contrib.staticfiles
"
,
"
django.contrib.staticfiles
"
,
"
django.contrib.humanize
"
,
"
django.contrib.humanize
"
,
"
django.contrib.postgres
"
,
]
]
# AUTHENTICATION
# AUTHENTICATION
...
...
This diff is collapsed.
Click to expand it.
tuning/wagtail_hooks.py
+
8
−
1
View file @
b1a9cd61
from
django.contrib.postgres.lookups
import
Unaccent
from
django.db.models.functions
import
Lower
from
django.utils.safestring
import
mark_safe
from
django.utils.safestring
import
mark_safe
from
wagtail.core
import
hooks
from
wagtail.core
import
hooks
...
@@ -5,7 +7,7 @@ from wagtail.core import hooks
...
@@ -5,7 +7,7 @@ from wagtail.core import hooks
class
HelpPanel
:
class
HelpPanel
:
order
=
1000
order
=
1000
def
render
(
self
):
def
render
_html
(
self
,
parent_context
):
return
mark_safe
(
return
mark_safe
(
"""
"""
<section class=
"
nice-padding
"
>
<section class=
"
nice-padding
"
>
...
@@ -20,3 +22,8 @@ class HelpPanel:
...
@@ -20,3 +22,8 @@ class HelpPanel:
@hooks.register
(
"
construct_homepage_panels
"
)
@hooks.register
(
"
construct_homepage_panels
"
)
def
add_another_welcome_panel
(
request
,
panels
):
def
add_another_welcome_panel
(
request
,
panels
):
panels
.
append
(
HelpPanel
())
panels
.
append
(
HelpPanel
())
@hooks.register
(
"
construct_explorer_page_queryset
"
)
def
show_my_profile_only
(
parent_page
,
pages
,
request
):
return
pages
.
order_by
(
Unaccent
(
Lower
(
"
title
"
)))
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