my 2c's
they should fail silently in production mode, and log an error in the
error log. (never show an error page to your user if you can help it)
an alternative approach would be to generate a 'comment' in the
template which would work OK in most instances.
--I
On 10/06/2006, at 4:39 PM,
On Sat, 2006-06-10 at 14:57 +, Gary Wilson wrote:
> Simon Willison wrote:
> > On 10 Jun 2006, at 07:39, Malcolm Tredinnick wrote:
> >
> > > What's our policy on template filters failing? If applying a filter
> > > raises an error, should we just trap it and return the empty
> > > string, or
>
Hi,
The docs say, a filter shouldn't raise an Exception. But this does
not indicate what would happen if a filter does raise one; it merely
says you shouldn't do this, so the result is unspecified.
Actually, during development I'm thankful when an exception turns
into a traceback, so that
FYI, here is a previous django-dev discussion
Failing silently, and documentation thereof
http://groups.google.com/group/django-developers/browse_thread/thread/40adac6370fc195c/b1656b8e0c036c04
--~--~-~--~~~---~--~~
You received this message because you are subsc
Simon Willison wrote:
> On 10 Jun 2006, at 07:39, Malcolm Tredinnick wrote:
>
> > What's our policy on template filters failing? If applying a filter
> > raises an error, should we just trap it and return the empty
> > string, or
> > raise an error? I can't find this written down anywhere, but may
On Saturday 10 June 2006 13:30, Honza Král wrote:
> I don't understand your question
> bacause the number of parameters may differ, that is why you use
> *args and **kwargs
The problem is that the decorators you demonstrated do not preserve the
signature of the function, so when you do inspect.g
I don't understand your question
bacause the number of parameters may differ, that is why you use *args
and **kwargs
Is this what you need?
this decorator works with any function with any number of parameters,
both positional and keyword
In [7]:def decor( function ):
...:def _callit( *args
On 10 Jun 2006, at 07:39, Malcolm Tredinnick wrote:
> What's our policy on template filters failing? If applying a filter
> raises an error, should we just trap it and return the empty
> string, or
> raise an error? I can't find this written down anywhere, but maybe
> I've
> missed it.
The