Flask-Moment not displaying anything on template

Viewed 2772

I have a template, named user.html, w/ this line of code:

<p>Member since {{ moment(user.member_since).format('L') }}. Last seen {{ moment(user.last_seen).fromNow() }}.</p>

Which renders the following page:

enter image description here

It looks like it's not rendering anything, yet looking at the source code of that same page:

enter image description here

...I can see my timestamps between tags.

My question is: What is stopping the browser from displaying my timestamp in the browser?


Things to consider:

  • I'm using Flask-Moment==0.5.1 (pulled straight from pip freeze command)
  • I'm pulling the timestamp from a PostgreSQL database (image below)
  • I'm following the Flask Web Development book, by Miguel Grinberg (pulled code straight from there)
  • I've already checked the Flask-Moment github page and the moment.js documentation and found no answer to this question.

Any insight will be greatly appreciated!


Timestamp registry in table

enter image description here

3 Answers

flask-moment requires your flask app to have access to both jquery.com and cloudflare.com. Make sure your browser extensions are not blocking access to external domains or you might see the same issue. Not that I'd ever do something so dumb. :-]

Related