Skip to content

Commit 6add0ee

Browse files
authored
Remove unused pagedown css demo.css (#3676)
1 parent 3caf414 commit 6add0ee

File tree

4 files changed

+14
-3
lines changed

4 files changed

+14
-3
lines changed

hypha/apply/activity/forms.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
from django.db import transaction
33
from django.utils.translation import gettext_lazy as _
44
from django_file_form.forms import FileFormMixin
5-
from pagedown.widgets import PagedownWidget
65

76
from hypha.apply.stream_forms.fields import MultiFileField
87
from hypha.apply.todo.options import COMMENT_TASK
98
from hypha.apply.todo.views import add_task_to_user
109
from hypha.apply.users.models import STAFF_GROUP_NAME, User
10+
from hypha.core.widgets import PagedownWidget
1111

1212
from .models import Activity, ActivityAttachment
1313

hypha/apply/utils/blocks.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
from django.forms.utils import ErrorList
66
from django.utils.safestring import mark_safe
77
from django.utils.translation import gettext_lazy as _
8-
from pagedown.widgets import PagedownWidget
98
from wagtail.admin import messages
109
from wagtail.blocks import ListBlock, StaticBlock, StreamBlock, StreamValue
1110

@@ -15,6 +14,7 @@
1514
TextFieldBlock,
1615
)
1716
from hypha.apply.utils.options import RICH_TEXT_WIDGET
17+
from hypha.core.widgets import PagedownWidget
1818

1919

2020
def find_duplicates(items):

hypha/core/widgets.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
from django.forms.widgets import Media
2+
from pagedown.widgets import PagedownWidget as PagedownWidgetBase
3+
4+
5+
class PagedownWidget(PagedownWidgetBase):
6+
"""
7+
Custom PagedownWidget to remove demo.css included in the default widget.
8+
"""
9+
10+
@property
11+
def media(self):
12+
return Media(css={"all": ("pagedown.css",)}, js=PagedownWidgetBase.Media.js)

public/pagedown/demo/browser/demo.css

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)