Re: Featurereuqest: Helpfull tracebacks

2013-08-21 Thread Ben Finney
Roland van Laar writes: > I would like to know which Model and Field caused the error. > > Such as: DatabaseError: own_app.models.User.street: value too long for > type character varying(100). This could be done by having Django's database interface catch the error, and chain

Re: ValidationError for fields

2013-08-21 Thread Loic Bistuer
On Aug 22, 2013, at 4:29 AM, Wim Feijen wrote: > How about: > > form.add_errors(dictionary) That's actually supported, although you need to nullify `field` explicitly: `form.add_errors(None, dictionary)`. It's mostly used internally; I'm not sure it's really useful to

Re: ValidationError for fields

2013-08-21 Thread Wim Feijen
Hi Loic, That's nice! It looks very powerful, saving lines of code and being more clear. How about: form.add_errors(dictionary) ? Because then we can either add one or more errors at the same time. Wim On Wednesday, 21 August 2013 02:31:07 UTC+2, Simon Litchfield wrote: > > An improvement

Re: [GSoC] Revamping validation framework and merging django-secure once again

2013-08-21 Thread Christopher Medrela
Progress: - Converted `BaseCommand.verbosity` from bytestring into an unicode. - Integrated compatibility checks. - Deprecated "validate" command. This command delegates to "check" command now. Changed "check" command -- it performs all system checks, including model validation and

Re: Proposal: A diagram showing Class Based View inheritance and mixins.

2013-08-21 Thread Meshy
Copied from the related thread on reddit: "the folks at ccbv.co.uk have been looking to build some sort of diagram..." We have indeed! In fact, in response to excitement generated by this thread, I've shipped our best version so far. To see it: go to any class on ccbv (eg

Re: Featurereuqest: Helpfull tracebacks

2013-08-21 Thread Michael Manfre
Any improvements would need to be backend specific due to differences in error messages between database servers (and potentially different versions of the same database server). It sounds like the identified problem is the potential for a mismatch between model definitions and the underlying

Re: Featurereuqest: Helpfull tracebacks

2013-08-21 Thread Albert O'Connor
On Wed, Aug 21, 2013 at 7:55 AM, Florian Apolloner wrote: > > > On Wednesday, August 21, 2013 12:18:24 PM UTC+2, Anssi Kääriäinen wrote: >> >> Improvements to error messages are usually accepted. This idea, too, if >> there is a way to actually do it without ugly hacks. >>

More input on #20945

2013-08-21 Thread Curtis Maloney
Was just after some more eyes and opinions on https://code.djangoproject.com/ticket/20945 Current PR is at: https://github.com/django/django/pull/1490 This patch does two things: 1) it allows specifying on a {% cache %} tag which cache to use {% cache . using="cachename" %} 2) it makes

Re: Featurereuqest: Helpfull tracebacks

2013-08-21 Thread Florian Apolloner
On Wednesday, August 21, 2013 12:18:24 PM UTC+2, Anssi Kääriäinen wrote: > > Improvements to error messages are usually accepted. This idea, too, if > there is a way to actually do it without ugly hacks. > I doubt there is a way to get that from the error message itself and I'll strongly

Re: Featurereuqest: Helpfull tracebacks

2013-08-21 Thread Anssi Kääriäinen
On 08/21/2013 12:44 PM, Roland van Laar wrote: Hello, TLDR: An error message with more information to easily fix the problem. I got this error message: django.db.utils.DatabaseError: value too long for type character varying(100) What I want is to fix this error in my code as quickly as

Featurereuqest: Helpfull tracebacks

2013-08-21 Thread Roland van Laar
Hello, TLDR: An error message with more information to easily fix the problem. I got this error message: django.db.utils.DatabaseError: value too long for type character varying(100) What I want is to fix this error in my code as quickly as possible. Now I need to dig through the stacktrace,