Re: How to generally handle exceptions in function based and class based views?

2014-11-03 Thread Steven Cummings
It sounded like you wanted to show something to the user, but don't keep the info from yourself as well (with respect to monitoring the site). So use the django messages framework to tell them something when wrong (not the exception details), or if you can't even render the attempted workflow then

Re: Test driven development in Django framework

2012-09-08 Thread Steven Cummings
I think when people say "unit" tests to mean fully isolated tests, what they really mean is *whitebox* tests. You define the size of the unit under test and context runs from full isolation (whitebox test) to full integration/user-experience (blackbox test) -- Steven On Fri, Sep 7, 2012 at 7:39 A

Re: Optimistic Locking in Django?

2012-06-30 Thread Steven Cummings
If you read over the linked discussion it's quite possible, just an issue of how disruptive it would be to the ORM APIs. On Saturday, June 30, 2012, Dennis Lee Bieber wrote: > On Sat, 30 Jun 2012 15:24:59 -0700 (PDT), ydjango > > > > declaimed the following in gmane.comp.python.django.user: > >

Re: Optimistic Locking in Django?

2012-06-30 Thread Steven Cummings
I started looking into it a while back: https://code.djangoproject.com/ticket/16549 The work broke down into ensuring that the updated/deleted/matched counts were returned from the internal ORM objects. Then there was a fair amount of discussion of what the public API of the ORM could provide on t

Re: Sample Custom Decorator

2011-10-11 Thread Steven Cummings
The wrapper that you typically see is the new function that is returned. This usually invokes the original, given function in addition to some extra ("decorating") logic around that call. Based on that question it sounds like you might want to check out some introductory material on decorators [1][