[Fixed]-How to increment a counter with upper limit in Django models, with a single query?

1👍

You need consistency at DB level, so neither of app-side methods will ensure that. What you need is logic inside database. You can achieve that with triggers or with conditional updates in Django >= 1.8.

👤Slam

Leave a comment