protibimbok / django-vite-plugin

This plugin configures Vite for use with Django backend.
103 stars 13 forks source link

`STATIC_ROOT` as `Path` not supported #24

Closed scratchmex closed 1 year ago

scratchmex commented 1 year ago
  File "/home/ivan/code/<project>/.venv/lib/python3.11/site-packages/django_vite_plugin/utils.py", line 25, in <module>
    manifest_path = getattr(settings, 'BASE_DIR') / CONFIG['BUILD_DIR'].lstrip('/\\') / 'manifest.json'
                                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'PosixPath' object has no attribute 'lstrip'

happens when setting static root to a path

STATIC_ROOT = ROOT_DIR / "static"

easy fix just to do str. will make a PR