-
Notifications
You must be signed in to change notification settings - Fork 169
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Formatting media.datetime #271
Milestone
Comments
The documentation is wrong (sorry!), |
nelsonov
added a commit
to nelsonov/sigal
that referenced
this issue
Nov 26, 2017
As discussed in Issue saimn#271 In the documentation media.dateobj was mistakenly called media.datetime while media.datetime itself is a string. Added some more media date related values. To avoid breaking things, dateobj and datetime remain unchanged. datetimelocal, datelocal and timelocal were added. As their names imply, they contain values appropriate for the system's LOCALE.
I added a |
kontza
pushed a commit
to kontza/sigal
that referenced
this issue
Aug 28, 2020
- The default format is now `%c` - Fix documentation confusion between ``datetime`` and ``dateobj``
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In the documentation for themes, you mention formatting datetime like this:
{% if media.exif.datetime %}
{{ media.exif.datetime.strftime('%A, %d. %B %Y') }}
{% endif %}
However, media.exif.datetime does not appear to be a Python datetime object. When I attempt this in the colorbox index.html, I get the following error
File "/media/cams/themes/colorbox/templates/index.html", line 44, in template
data-date=", {{ media.exif.datetime.strftime('%c') }}"
jinja2.exceptions.UndefinedError: 'unicode object' has no attribute 'strftime'
Am I missing something?
Thank you.
The text was updated successfully, but these errors were encountered: