Decoupling Your Business Logic from the Django ORM

Where should I keep my business logic? This is a perennial topic in Django. We can imagine a continuum of cases, with increasing complexity: I begin with my...

The Stack Report
@carlton disregarding specific libraries, there's definitely a rich discussion to be had around application architecture and complexity management here, and I think your entry here adds to it thoughtfully. I personally fall into the camp where I'll happily put the business logic meat into the "view", eschewing a service layer until the codepath needs to be shared. I have folks at $DAYJOB arguing otherwise, and not without merit.

@tintvrtkovic Ooh, good. Spicy 🌶️

I have OPINIONS about keep views bare... so I tend to have logic live in forms[*] — but people hate that too 😜

Glad you liked it. That you liked it before the cattrs reveal is extra nice, but you know I've been using it. (We can finally carry on our conversation: will you be in Bologna?)

[*]: It sounds crazy but is remarkably clean, I promise.

@carlton baby is still too demanding for conferences I'm afraid. Will have to wait until next year. Hynek is also pressuring me to get back out there 😇
@tintvrtkovic Take your time! The child grows too quickly. Meanwhile the conferences aren't going anywhere.