Skip to content

Commit

Permalink
Remove unused pagedown css demo.css (#3676)
Browse files Browse the repository at this point in the history
  • Loading branch information
theskumar authored Jan 31, 2025
1 parent 3caf414 commit 6add0ee
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 3 deletions.
2 changes: 1 addition & 1 deletion hypha/apply/activity/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
from django.db import transaction
from django.utils.translation import gettext_lazy as _
from django_file_form.forms import FileFormMixin
from pagedown.widgets import PagedownWidget

from hypha.apply.stream_forms.fields import MultiFileField
from hypha.apply.todo.options import COMMENT_TASK
from hypha.apply.todo.views import add_task_to_user
from hypha.apply.users.models import STAFF_GROUP_NAME, User
from hypha.core.widgets import PagedownWidget

from .models import Activity, ActivityAttachment

Expand Down
2 changes: 1 addition & 1 deletion hypha/apply/utils/blocks.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
from django.forms.utils import ErrorList
from django.utils.safestring import mark_safe
from django.utils.translation import gettext_lazy as _
from pagedown.widgets import PagedownWidget
from wagtail.admin import messages
from wagtail.blocks import ListBlock, StaticBlock, StreamBlock, StreamValue

Expand All @@ -15,6 +14,7 @@
TextFieldBlock,
)
from hypha.apply.utils.options import RICH_TEXT_WIDGET
from hypha.core.widgets import PagedownWidget


def find_duplicates(items):
Expand Down
12 changes: 12 additions & 0 deletions hypha/core/widgets.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
from django.forms.widgets import Media
from pagedown.widgets import PagedownWidget as PagedownWidgetBase


class PagedownWidget(PagedownWidgetBase):
"""
Custom PagedownWidget to remove demo.css included in the default widget.
"""

@property
def media(self):
return Media(css={"all": ("pagedown.css",)}, js=PagedownWidgetBase.Media.js)
1 change: 0 additions & 1 deletion public/pagedown/demo/browser/demo.css

This file was deleted.

0 comments on commit 6add0ee

Please sign in to comment.