I've handed in my resignation letter yesterday ... :)
jhfisc has quit
FunkyBob
oooh
next job firm in hand?
jhfisc joined the channel
shangxiao has quit
FunkyBot has quit
dodobas
FunkyBob: not really, i would like to focus on opensource projects for a couple of months, and look for remote work ...
enkrypt has quit
jhfisc has quit
dodobrain
wait that sounds almost like me!
dodobas
dodobrain: did you also quit your job? :)
dodobrain
jeh
and also same to your 'not really' answer to funkybob
dodobas
hehehe, must be something in the air ...
dodobrain
of the rest, the 'remote' part is also true. only changes would be 'couple of months' and 'focus on opensource projects' :)
lets hope the dodos dont go extinct this time around ;)
fleetfox
O_o
FunkyBob
dodos alike?
aossama joined the channel
dodobrain
lawl, dodobas is like yoda compared to me when it comes to django
maks25 has quit
dodobas
dodobrain: what ?
dodobrain
in terms of knowledge and experience i imagine
arseniy joined the channel
bradfordli123 has quit
bradfordli123 joined the channel
energizer
Which autocomplete package should I use? I'm typing in a TextInput and I have a queryset of objects to match it.
dodobas
dodobrain: not sure about that, i've been mostly working in layers below Django
energizer
The options available will be different depending on the context
ycon_ joined the channel
jtiai
Morning. When using django test client with post, how do i add query params as well?
mattmcc
They'd go on the URL.
fleetfox
you have to urlencode them yourself :(
aossama has quit
jtiai
Bummer.
enkrypt joined the channel
lavalamp has quit
With .get() it's so handy that it does automatically with data.. wish there would have been similar thing for post/put/delete etc.
bradfordli123 has quit
fleetfox
i don't think api is that obvious
but yes
jtiai
Well, QueryDict for a rescue.
aossama joined the channel
Next stupid question, how to test that .post actually redirected me to location x?
fleetfox
assertRedirects
cubillosxy_py joined the channel
m712
hello, i am trying to make a .save() function on my model atomic, and I have a @transaction.atomic decorator on it. however, i am still getting concurrency issues. How can I fix these?
aossama has quit
shangxiao joined the channel
how can I start a database transaction to commit everything in one go?
shangxiao
transaction.atomic
fleetfox
what kind of issues?
m712
fleetfox: same post id being saved multiple times
i need some kind of a lock on the database
fleetfox
weel that has nothing to do with atomicity
shangxiao
select_for_update()
m712
shangxiao: ?
shangxiao
m712: ?
aossama joined the channel
MarkusH
jarshwah: I'm trying to figure out how / where __exact is registered for a field. And following that, I want my subclass of CharField to only have two lookups __exact and __something where neither one is the default and each usage of that field *has* to specify one of the lookups explicitly
shangxiao: i have a database id and a board_post_id
which is a board-specific ID
i have already done unique_together
schinckel
Oh poop. My in-postgres idea using triggers to prevent bad writes dpaste expired.
fleetfox
lul
m712
shangxiao: now, when I am creating a post, i check the total_posts number on the Board i am posting on, then set it to my ID, then increment total_posts by one.
you can see why it's having issues
probably select_for_update will fix this
fleetfox
schinckel: how you propagate to django from trigger? You will have to parse strings in exception, no ?
schinckel
fleetfox: Yeah.
fleetfox
yeah, that sucks
shangxiao
yep so that doesn't sound like the problem that fleetfox described
m712
shangxiao: does select_for_update wait until the end of an atomic block?
i mean
shangxiao
"described a solution for"
m712
does it hold a lock
fleetfox
it does
shangxiao
pessimistic sounds fine for creation issues
m712
okay, thanks a lot everyone
shangxiao: probably would not want posts randomly dropping ^^;
shangxiao
nah someone might get angry :)
fleetfox
i want you to understand that with naive locking you can still get phantom reads and other issues, depending on what you are doing it may be import
ant
shangxiao
from anthill import ant?
fleetfox
:d
shangxiao
fleetfox: curious as to what you meant by that
m712
fleetfox: i just want to lock reads/writes on a table until i update it, which is backend_board