Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Log error when resolving RESOLVED_WEB_MODULES_PATH fails
  • Loading branch information
Archmonger committed Mar 12, 2025
commit 510ad5c2ccaa73498f589d808cb27b80f4d4cc7f
8 changes: 6 additions & 2 deletions src/reactpy_django/templatetags/reactpy.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,16 @@
from django.http import HttpRequest
from reactpy.core.types import ComponentConstructor, ComponentType, VdomDict


register = template.Library()
_logger = getLogger(__name__)


try:
RESOLVED_WEB_MODULES_PATH = reverse("reactpy:web_modules", args=["/"]).strip("/")
except NoReverseMatch:
RESOLVED_WEB_MODULES_PATH = ""
register = template.Library()
_logger = getLogger(__name__)
_logger.exception("Could not resolve the 'web_modules' URL path!")


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