tl-its-umich-edu / canvas-app-explorer

A Web application that presents a list of Canvas external (LTI) tools with details. When integrated within Canvas, the user can search for specific LTI tool(s), and add or remove those tools from Canvas courses.
Apache License 2.0
4 stars 6 forks source link

Admin page isn't able to load static css files #50

Closed jonespm closed 3 years ago

jonespm commented 3 years ago

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.

image

ssciolla commented 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

jonespm commented 3 years ago

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.

jonespm commented 3 years ago

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.