mardi 24 mars 2020

How to create a "post of the day" with flask [duplicate]

I have a flask app which uses SQLAlchemy. This my Flask app have randomly selected posts (using random.choice) in the home page. This randomly selected post(s) changes every time when the page refreshes. But I want to randomly select a post and keep it for a specific time period and changed the post itself when that time period passed. In simple English, I want to make a "Post of the day" or "Post of the week". How can I do this using flask ?




Aucun commentaire:

Enregistrer un commentaire