forked from CGM_Public/pretix_original
Import large package lazily to speed up startup (#5636)
* Import large package lazily to speed up startup * Make all jsonschema imports lazy
This commit is contained in:
@@ -47,7 +47,6 @@ from urllib.parse import urljoin, urlparse
|
||||
from zoneinfo import ZoneInfo
|
||||
|
||||
import requests
|
||||
from bs4 import BeautifulSoup
|
||||
from celery import chain
|
||||
from celery.exceptions import MaxRetriesExceededError
|
||||
from django.conf import settings
|
||||
@@ -764,6 +763,8 @@ def render_mail(template, context, placeholder_mode=SafeFormatter.MODE_RICH_TO_P
|
||||
|
||||
|
||||
def replace_images_with_cid_paths(body_html):
|
||||
from bs4 import BeautifulSoup
|
||||
|
||||
if body_html:
|
||||
email = BeautifulSoup(body_html, "lxml")
|
||||
cid_images = []
|
||||
|
||||
Reference in New Issue
Block a user