Skip to content

Commit 510ad5c

Browse files
committed
Log error when resolving RESOLVED_WEB_MODULES_PATH fails
1 parent f63f14d commit 510ad5c

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/reactpy_django/templatetags/reactpy.py

+6-2
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,16 @@
2929
from django.http import HttpRequest
3030
from reactpy.core.types import ComponentConstructor, ComponentType, VdomDict
3131

32+
33+
register = template.Library()
34+
_logger = getLogger(__name__)
35+
36+
3237
try:
3338
RESOLVED_WEB_MODULES_PATH = reverse("reactpy:web_modules", args=["/"]).strip("/")
3439
except NoReverseMatch:
3540
RESOLVED_WEB_MODULES_PATH = ""
36-
register = template.Library()
37-
_logger = getLogger(__name__)
41+
_logger.exception("Could not resolve the 'web_modules' URL path!")
3842

3943

4044
@register.inclusion_tag("reactpy/component.html", takes_context=True)

0 commit comments

Comments
 (0)