You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The problem stems from DjangoResolver#resolve_source_to_url only using the item argument, which is the unexpanded glob pattern, rather then making a url from the filepath argument which is the expanded path.
Ah crap, that's basically the same problem Flask-Assets currently has.
It would certainly be possible to loop through the finder storages, find the right one based on it's base path, and thus calculate it's relative url. But it's a bit unfortunate, since the information is right there when the globbing happens, it just isn't kept. Maybe an update to the Resolver API is called for.
Create a bundle that uses globs:
And say it includes 4 files, the final output will be:
The problem stems from
DjangoResolver#resolve_source_to_url
only using theitem
argument, which is the unexpanded glob pattern, rather then making a url from thefilepath
argument which is the expanded path.https://github.com/miracle2k/django-assets/blob/master/django_assets/env.py#L153-L161
I would submit a PR, but I'm not sure of the best way to go around fixing this.
The text was updated successfully, but these errors were encountered: