Closed jonespm closed 3 years ago
Looks like adding 'django.contrib.staticfiles'
to the INSTALLED_APPS
array in settings.py
is the fix. https://docs.djangoproject.com/en/3.2/ref/contrib/staticfiles/#module-django.contrib.staticfiles
Hmm, it looks like when I add that it does fix the problem for the backend (admin page) but breaks some image links in the frontend. I think this was because I was trying to serve files from the frontend on the /static/ path and this takes over that path. I'll either have to get a more specific directory (like /static/plasmic) or get this path/directory to be served up by this staticfiles app.
This might be resolved by also running the management command collectstatic, which should put the static files for the frontend into /static. But I felt like there might be an easier way of dealing with this since they are already collected by the frontend.
I'll read more about this and how webpack-loader is doing this.
When logging into http://localhost:5000/admin/ the css isn't working and it's not able to get some files from static. This is probably either because these aren't being collected or the path isn't exposed correctly. Will look into fixing this.