-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
28 changed files
with
581 additions
and
3,225 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
from functools import cache | ||
from itertools import chain | ||
|
||
|
||
from wagtail.models import Locale | ||
from cms.models.blog import BlogIndexPage | ||
from cms.models.flex import FlexPage | ||
from cms.models.text import TextPage | ||
|
||
|
||
@cache | ||
def cms_menu_pages(request): | ||
try: | ||
locale = Locale.objects.get(language_code=request.LANGUAGE_CODE) | ||
except Locale.DoesNotExist: | ||
return {"cms_navbar_pages": None} | ||
blog_pages = BlogIndexPage.objects.filter(locale=locale, show_in_menus=True) | ||
flex_pages = FlexPage.objects.filter(locale=locale, show_in_menus=True) | ||
text_pages = TextPage.objects.filter(locale=locale, show_in_menus=True) | ||
return { | ||
"cms_navbar_pages": chain(blog_pages, flex_pages), | ||
"cms_footer_pages": chain(blog_pages, flex_pages, text_pages), | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
56 changes: 56 additions & 0 deletions
56
cms/migrations/0005_remove_customflatmenuitem_link_page_and_more.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
# Generated by Django 4.2.5 on 2024-01-07 22:59 | ||
|
||
from django.db import migrations | ||
|
||
|
||
class Migration(migrations.Migration): | ||
dependencies = [ | ||
("cms", "0004_legal_impress_page_de_legal_impress_page_en_and_more"), | ||
] | ||
|
||
operations = [ | ||
migrations.RemoveField( | ||
model_name="customflatmenuitem", | ||
name="link_page", | ||
), | ||
migrations.RemoveField( | ||
model_name="customflatmenuitem", | ||
name="menu", | ||
), | ||
migrations.RemoveField( | ||
model_name="custommainmenu", | ||
name="site", | ||
), | ||
migrations.RemoveField( | ||
model_name="custommainmenuitem", | ||
name="link_page", | ||
), | ||
migrations.RemoveField( | ||
model_name="custommainmenuitem", | ||
name="menu", | ||
), | ||
migrations.RemoveField( | ||
model_name="brand", | ||
name="footer_text_de", | ||
), | ||
migrations.RemoveField( | ||
model_name="brand", | ||
name="footer_text_en", | ||
), | ||
migrations.RemoveField( | ||
model_name="brand", | ||
name="footer_text_es", | ||
), | ||
migrations.DeleteModel( | ||
name="CustomFlatMenu", | ||
), | ||
migrations.DeleteModel( | ||
name="CustomFlatMenuItem", | ||
), | ||
migrations.DeleteModel( | ||
name="CustomMainMenu", | ||
), | ||
migrations.DeleteModel( | ||
name="CustomMainMenuItem", | ||
), | ||
] |
20 changes: 20 additions & 0 deletions
20
cms/migrations/0006_remove_brand_footer_text_remove_brand_svg_footer.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Generated by Django 4.2.5 on 2024-01-07 23:01 | ||
|
||
from django.db import migrations | ||
|
||
|
||
class Migration(migrations.Migration): | ||
dependencies = [ | ||
("cms", "0005_remove_customflatmenuitem_link_page_and_more"), | ||
] | ||
|
||
operations = [ | ||
migrations.RemoveField( | ||
model_name="brand", | ||
name="footer_text", | ||
), | ||
migrations.RemoveField( | ||
model_name="brand", | ||
name="svg_footer", | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.