vanvalenlab / deepcell-datasets

React App for hosting curated datasets.
Other
0 stars 0 forks source link

Fix template routing and PEP8 changes #34

Closed willgraf closed 4 years ago

willgraf commented 4 years ago

Turns out the template_folder must be declared inside the blueprint for it to find a template directory that is not in the root. I discovered this by using the EXPLAIN_TEMPLATE_LOADING config option (which I've set to be enabled when DEBUG is True) and found that only the general_bp was being searched for template files. It was ALSO the only blueprint with the template_folder set.

I also added pip install wheel to the GitHub Actions workflow which fixes the failure, though I am still unsure why that issue came up in the first place.

Finally, I noticed that the same infopane.html and loading-bar.html partials were copied and pasted into each sub-template directory. Instead, I moved base.html and all the partials into the global /templates, which seems to work just fine. I also removed some stale CSS from main.css. I think it's best to keep around as little custom CSS as possible and remove any not being used.