I'm working on a blog-like application with Flask and SQLAlchemy and I'm unsure how to store the blog posts (articles) in the database. These are going to contain text and images (placed between paragraphaphs). I expect the text to have formatting, with bold, italic, different font sizes, etc.

Would markup be a good option? If so, would each blog post have an html file of its own? That doesn't seem very efficient, but maybe there's an elegant way of doing so.

If not markup , then what can I use?

In this answer to a similar question, they mention a react markdown package. If markdown is the 'best' way to solve this, is there something similar to this package in Flask or SQLAlchemy?

Note that by 'best', I mean the most appropriate and simplest, the easiest to integrate to a Flask SQLAlchemy project.

If any code is necessary, please tell me.

  • 1
    Hi there. The initial part about how to store a post in a database is on topic, and we could give some very good advice. Namely use something like Markdown. The problem is that you've already answered this excellent question and proceeded to ask us about recommending a framework/library. We all love our libraries, the problem is that there is rarely if ever an "answer" to such a question just an army of opinions and sadly makes your question unanswerable.
    – Kain0_0
    Mar 22 '20 at 22:44
  • Hi! Thank you for the feedback. I'll look for Markdown options, and do my best to formulate a better question next time (if necessary). Thanks once again! Mar 23 '20 at 8:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.