Skip to content

Commit ec3dc1e

Browse files
author
delsim
committed
Update path formation to be OS-agnostice, addresses #529
1 parent 1473fde commit ec3dc1e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

django_plotly_dash/finders.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
import importlib
2727

2828
from collections import OrderedDict
29+
from pathlib import Path
2930

3031
from django.contrib.staticfiles.finders import BaseFinder
3132
from django.contrib.staticfiles.utils import get_files
@@ -132,7 +133,8 @@ def find(self, path, find_all=False, all=False):
132133
storage = self.storages[component_name]
133134
location = storage.location # dir on disc
134135

135-
component_path = "dash/component/%s" % component_name
136+
component_path = str(Path("dash/component/%s" % component_name))
137+
136138
if (
137139
len(path) > len(component_path)
138140
and path[: len(component_path)] == component_path

0 commit comments

Comments
 (0)