delgiudices: For your information, never use FloatField for monetary.
Use DecimalField instead.
Float can be imprecise for some case.
delgiudices
Debnet: oh okay thanks
Debnet
delgiudices: The best way to figure it is to do this in python shell : 0.1 + 0.1 + 0.1 - 0.3
This operation doesn't return 0.
But something very close.
Due to float imprecision.
nimomo joined the channel
Moridin666 has quit
Whereas decimal('0.1') + decimal('0.1') + decimal('0.1') - decimal('0.3') will be decimal('0.0') without a doubt. :D
jonatas__ has quit
jazzzu joined the channel
dray3 joined the channel
elbaschid joined the channel
stown
Does anyone has a suggestion for an invoice form with inline forms, seems not much to find about it
kendas joined the channel
Debnet
stown: Not at all. Long time I didn't work with forms in Django.
SpoutBE has quit
Introvert- joined the channel
Introvert- has left the channel
stown
Debnet: not with forms yeah?
ajay2611 joined the channel
Debnet
stown: Hum?
bkuberek joined the channel
stown
Debnet: you build django apps and not work with forms?
graingert_ has quit
Debnet
Yeah, mainly using ORM and Django REST Framework.
johnride
Debnet: I want to serialize a ValidationError to JSON because I send my form in Ajax and I want to send back the errors to the frontend in JSON
Debnet
I build frontend with others technologies like AngularJS.
johnride: You could wrap all exceptions occuring when "cleaning" data and return them to the client.
ValidationError are iterables.
Like any exception.
It's pretty simple to do.
ajay2611
Hi, I've a formset of 5 forms. after posting the formset data..i'm saving forms which are validated and return the unvalidated forms of formset. Now after entering correct data in remaining forms..and posting again.. i'm recieving 5 forms again.. any clues why this is happening?
kendas has quit
wattz has quit
wattz joined the channel
Debnet
ajay2611: Hard to understand your problem without a code sample and further details.
johnride
Debnet: that's pretty much what I do and I get an error that says that my ValidationError is not JSON serializable https://dpaste.de/CpBr
stown
Dennet: AngularJS for frontend and just POST instructions with ORM for add/edit/ functionality?
Debnet: AngularJS for frontend and just POST instructions with ORM for add/edit/ functionality?
Debnet
stown: Not only POST, all HTTP verbs that suits to REST.
stown
Debnet: isnt the client side authorization key readable in the javascript of AngularJS?