Re: better error handling in templatetags?

2009-11-26 Thread KONTRA, Gergely
My problem is the error handling of django in templatetags, not the specific dummy error, which I programmed: @register.simple_tag def current_time(): 1/0 return unicode(datetime.datetime.now()) What annoys me, that you cannot find the line number of the error, just a message, tha

Re: better error handling in templatetags?

2009-11-27 Thread KONTRA, Gergely
26, 2009 at 6:02 PM, KONTRA, Gergely > wrote: >> >> My problem is the error handling of django in templatetags, not the >> specific dummy error, which I programmed: >> >> @register.simple_tag >> def current_time(): >>        1/0 >>        return

Re: better error handling in templatetags?

2009-11-27 Thread KONTRA, Gergely
 9656   | |   | +- "Olyan lángész vagyok, hogy poroltóval kellene járnom!" -+ On Fri, Nov 27, 2009 at 17:22, Karen Tracey wrote: > On Fri, Nov 27, 2009 at 5:58 AM, KONTRA, Gergely > wrote: >> >> Seems like yo

Re: i18n model - tri-lingual data

2008-06-27 Thread KONTRA, Gergely
Correct me, but I don't think I can access the view from the model. So how is this possible? On Fri, Jun 27, 2008 at 2:06 AM, Julien <[EMAIL PROTECTED]> wrote: > > I reckon your view should check what the language is set in the > request (request.LANGUAGE_CODE), and then pull out the right field

Re: i18n model - tri-lingual data

2008-06-27 Thread KONTRA, Gergely
xtract > the first 2 letters of the language code, as it could be 'en-us' for > example. > > On Jun 27, 7:15 pm, "KONTRA, Gergely" <[EMAIL PROTECTED]> wrote: >> Correct me, but I don't think I can access the view from the model. >> So how is

Re: i18n model - tri-lingual data

2008-07-02 Thread KONTRA, Gergely
Many thanks! Will make my views and templates definitely shorter. On Wed, Jul 2, 2008 at 12:01 PM, Nebojša Đorđević <[EMAIL PROTECTED]> wrote: > On 26 Jun 2008, at 15:22, pihentagy wrote: >> Is there a way I can tell the model about the request's language? Or, >> well, I know it is a violation of

Re: accessing a model ojbect's saved fields

2008-07-09 Thread KONTRA, Gergely
> Could you override the save method and remove the file from the > filesystem prior to saving? That's what I'm attempting to. BUT: the question is: how can I figure out the database-saved value of the photo class MyModel(models.Model): photo = ImageField(upload_to='temp') def save(self)