18 maj 2013 18:48, "Anssi Kääriäinen" <anssi.ka...@thl.fi> napisał(a):
> There was very similar discussion recently (maybe in some ticket, I
> don't remember where) about QuerySet.__repr__(). IIRC the conclusion
> was that executing SELECT queries as part of __repr__() is OK.
I've been bitten by that one already. At least with postgresql if you invalidate the transaction executing any query other than rollback will raise an exception. It's not something you plan for ahead and it's a real pain to find the real cause.
I'd like to support this, I've seen my share of situations such as the one described by Patryk. Is there something we have been missing ?
--
You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-developers+unsubscribe@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/f0e2c9b1-39d2-462e-8b8a-4b1c0f4822c2%40googlegroups.com.
If at all possible, this should look like a valid Python expression that could be used to recreate an object with the same value (given an appropriate environment).