If I dump the POST data and the DATETIME_INPUT_FORMAT setting in the view I get this: u'14/04/2015 09:42' ('%d/%m/%Y %H:%M:%S', '%d/%m/%Y %H:%M', '%d-%m-%Y %H:%M:%S', '%d-%m-%Y %H:%M') -- So as far as I can tell they should be completely valid.
lakcaj joined the channel
Goopyo_ joined the channel
Goopyo_ has quit
Goopyo has quit
OK, weird. If I define input_formats on the ModelForm explicitly as that, it works.
in short -- if you don't want broken [American] date formats... you gotta work for it :P
SmileyChris
no, the opposite
more like "localize and let the American's stay oblivious with their broken date format"
FunkyBob
ah, of course :)
FunkyBob is only on his second pint of coffee
jarshwah joined the channel
lakcaj has quit
kenbolton has quit
AzMoo
Oh look, now it all works exactly as expected.
AzMoo headdesks.
delgiudices joined the channel
FunkyBob
right... time to get stuck into ansible
MrBaboon joined the channel
zampano joined the channel
atlasloewenherz has quit
klusias joined the channel
klusias
Hello. i got those models: https://dpaste.de/K8dA how can i modify my Product QuerySet to get flag - is item in current users whishlist?
SmileyChris
klusias: queryset or instance?
klusias
SmileyChris, not sure about wording. but idea is - i want to display all Product items + show additional data if instance Product is in request.user WishList
SmileyChris
klusias: it's probably more efficient to get the user's wishlist and just manually annotate the instances in the product queryset using this data
FunkyBob
jarshwah: so, this is one of those cases where you want to aggregate on a filtered related set
jarshwah: instead of filter then aggregate, since 0 is a valid answer
jarshwah
hang on, where?
klusias question?
FunkyBob
jarshwah: klusias's case
klusias
SmileyChris, yes atm i am using this approact. i got Product.objects.all(), then iterate each item and manuaaly asign that flag
SmileyChris
klusias: usually you aren't displaying *all* products at once
klusias
SmileyChris, maybe i need to create additional manager for that?
datakid joined the channel
Ariel_Calzada joined the channel
Ariel_Calzada has quit
Ariel_Calzada joined the channel
paridin
Hi, help me i understand why this https://dpaste.de/i4ds , when i call the view via ajax without fields variable it doesn't work but i don't understand.