gruifor,
@gruifor@floe.earth avatar

Today, my friendship with #Django has developed serious cracks.

I realized by accident that QuerySet.filter(Q()) gives you all instances, suggesting that the Q() is in some sense equivalent to "true". The surprise comes when you have QuerySet.filter(Q() | Q(foo='bar')), which gives you only those instances where foo is "bar", even though the disjunction should also be equivalent true, since "true OR something" is always equivalent to true. This makes no sense.

#logic

  • All
  • Subscribed
  • Moderated
  • Favorites
  • django
  • DreamBathrooms
  • magazineikmin
  • InstantRegret
  • thenastyranch
  • cubers
  • Youngstown
  • ethstaker
  • slotface
  • mdbf
  • rosin
  • Durango
  • kavyap
  • GTA5RPClips
  • khanakhh
  • JUstTest
  • tacticalgear
  • ngwrru68w68
  • cisconetworking
  • modclub
  • everett
  • osvaldo12
  • normalnudes
  • provamag3
  • anitta
  • tester
  • Leos
  • megavids
  • lostlight
  • All magazines