Stefan4472 / Stefans-Blog

Personal blogging platform built in Python
MIT License
0 stars 0 forks source link

Refactor post.py #60

Open Stefan4472 opened 2 years ago

Stefan4472 commented 2 years ago

What a mess.

flaskr/models/post.py

Stefan4472 commented 2 years ago

Superceded by #75

Stefan4472 commented 1 year ago

A general question to consider: would it be good to keep logic out of the models? Or at the very least, keep flask imports out?

The problem is, we then have a much harder time modifying data, because we'd have to propagate the changes back to the underlying models.