1👍
With the line {% static 'css/gallery.css' %}
you are trying to get the static file gallery.css located in the directory ‘css’ but this directory doesn’t exist as gallery is put in just the directory ‘static’ and not ‘static/css’. Try doing it by {% static 'gallery.css' %}
or creating a directory ‘css’ in static and putting gallery.css in it.
1👍
Old question and I’m sure you’ve either figured out a solution or moved on, but you need to add:
{% load static %}
in your gallery.html
beneath the {% extends 'base.html' %}
. Django templates require you to load static files on any template that you are using them in regardless if they are included in a template that you are extending from. See here for a better reference.
- [Answered ]-Migrating easy_thumbnails within Django upgrade from 1.6.7 to 1.7.1
- [Answered ]-Django template if inside a for loop – Invalid block tag on line 13: 'else', expected 'empty' or 'endfor'.
Source:stackexchange.com