Skip to content

Commit

Permalink
Switch to css-inline
Browse files Browse the repository at this point in the history
inlinestyler hasn't been maintained for a while.
  • Loading branch information
marksteward committed Apr 19, 2024
1 parent 3cd475d commit 28fa762
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 39 deletions.
3 changes: 0 additions & 3 deletions .mypy.ini
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,6 @@ ignore_missing_imports = True
[mypy-barcode.*]
ignore_missing_imports = True

[mypy-inlinestyler.*]
ignore_missing_imports = True

[mypy-pywisetransfer.*]
ignore_missing_imports = True

Expand Down
5 changes: 3 additions & 2 deletions apps/common/email.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from css_inline import CSSInliner
import markdown
from inlinestyler.utils import inline_css
from flask import render_template, url_for
from markupsafe import Markup
from flask import current_app as app
Expand Down Expand Up @@ -98,7 +98,8 @@ def format_trusted_html_email(markdown_text, subject, reason=None, **kwargs):
if not reason:
reason = f"You're receiving this email because you have a ticket for Electromagnetic Field {event_year()}."

return inline_css(
inliner = CSSInliner()
return inliner.inline(
render_template(
"admin/email/email_template.html",
subject=subject,
Expand Down
68 changes: 35 additions & 33 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ python-levenshtein = "~=0.12"
simplejson = "*"
requests = "~=2.29"
markdown = "~=3.1"
inlinestyler = "~=0.2"
flask = "~=2.3"
flask-caching = "~=2.0"
python-memcached = "==1.59"
Expand Down Expand Up @@ -66,6 +65,7 @@ logging_tree = "^1.9"
flask-mailman = "^0.3.0"
python-stdnum = "^1.19"
playwright = "^1.43.0"
css-inline = "^0.14.0"


[tool.poetry.group.dev.dependencies]
Expand Down

0 comments on commit 28fa762

Please sign in to comment.