-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove public primary nav (db) and "news" app (#3715)
- Removes the `NavigationSettings` and it's template tag. Keeps the custom html based navigation - Keeps the "news" installed app, so that model migrations are applied - update the sandbox db to remove news page data and schema from it - Remove management command for public pages exports
- Loading branch information
Showing
25 changed files
with
114 additions
and
816 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
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
147 changes: 0 additions & 147 deletions
147
hypha/public/home/management/commands/export_public_pages_json.py
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
15 changes: 15 additions & 0 deletions
15
hypha/public/navigation/migrations/0004_delete_navigationsettings.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,15 @@ | ||
# Generated by Django 4.2.9 on 2024-01-10 07:42 | ||
|
||
from django.db import migrations | ||
|
||
|
||
class Migration(migrations.Migration): | ||
dependencies = [ | ||
("navigation", "0003_alter_navigationsettings_primary_navigation"), | ||
] | ||
|
||
operations = [ | ||
migrations.DeleteModel( | ||
name="NavigationSettings", | ||
), | ||
] |
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 |
---|---|---|
@@ -1,34 +0,0 @@ | ||
from django.utils.translation import gettext_lazy as _ | ||
from modelcluster.models import ClusterableModel | ||
from wagtail import blocks | ||
from wagtail.admin.panels import FieldPanel | ||
from wagtail.contrib.settings.models import BaseSiteSetting | ||
from wagtail.fields import StreamField | ||
|
||
from hypha.core.wagtail.admin import register_public_site_setting | ||
|
||
|
||
class LinkBlock(blocks.StructBlock): | ||
page = blocks.PageChooserBlock() | ||
title = blocks.CharBlock( | ||
help_text=_("Leave blank to use the page's own title"), required=False | ||
) | ||
|
||
class Meta: | ||
template = ("navigation/blocks/menu_item.html",) | ||
|
||
|
||
@register_public_site_setting(icon="", classnames="icon icon-list-ul") | ||
class NavigationSettings(BaseSiteSetting, ClusterableModel): | ||
primary_navigation = StreamField( | ||
[ | ||
("link", LinkBlock()), | ||
], | ||
blank=True, | ||
help_text=_("Main site navigation"), | ||
use_json_field=True, | ||
) | ||
|
||
panels = [ | ||
FieldPanel("primary_navigation"), | ||
] | ||
10 changes: 0 additions & 10 deletions
10
hypha/public/navigation/templates/navigation/primarynav.html
This file was deleted.
Oops, something went wrong.
Empty file.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Empty file.
Oops, something went wrong.