As soon as Django drops support for Python 2 :)
--
Aymeric.
Le 22 août 2013 à 06:43, Ben Finney a écrit :
>
> This could be done by having Django's database interface catch the
> error, and chain a new exception from that one:
--
You received this message because you are subscribed to the G
On Friday, August 23, 2013 4:52:16 AM UTC+2, Ben Finney wrote:
>
> I didn't see a traceback. The OP gave only the error message. How do you
> know they are getting the model name?
>
If he had shown his full traceback you'd see how django came to execute
this query; when it reaches your code y
Florian Apolloner
writes:
> On Thursday, August 22, 2013 6:43:39 AM UTC+2, Ben Finney wrote:
> >
> > This could be done by having Django's database interface catch the
> > error, and chain a new exception from that one:
>
> Knowing the model alone is imo pretty useless since that's in the
> trace
On Thursday, August 22, 2013 6:43:39 AM UTC+2, Ben Finney wrote:
>
> This could be done by having Django's database interface catch the
> error, and chain a new exception from that one:
>
Knowing the model alone is imo pretty useless since that's in the traceback
anyways; also what you suggest
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 a new exception fro
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 data
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.
>>
>
> I doubt there is a w
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 obje
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 possib