The file-type contains 'image' so the filter assumed it was a .png or .jpg and
the image wouldn't render when it was a .svg file. This additional check to the
filter makes sure the svg.png (stock image file) is used when a thumbnail is
used in a HTML template.
These functions are mostly aimed at the site's XML-generated site map. The piece
together the site's URL from lack's request struct. I don't know if there is a
pre-built string containing this information (I.E. http://localhost:5000 and
http://localhost:5000/testing) which is why I have written these functions.
I didn't realise the local-time system set 'Sunday' to '0' in its
timestamp-day-of-week function. I thought it was '7'. This commit changes the
check for '7' to '0' and adds a few comments to help identify which days the cond
form is checking against.
This filter is builds the path for the dashboard profile image. The
path points to a different icon in the /images/icons directory
depending on what time and day it is.
There is no major functionality addition with this code. It just a
little sprinkle of cuteness for the user of the site.
I'm going to try this with Python and Django first. Because it's not
my personal project, it might be better to use a language which is
more mainstream. It should reduce the 'Bus Factor'.