is order.items cleared, or order deleted, or order.item just has itemA, itemB, null, or still has itemA, itemB, itemC, but itemC references a null object?
ryuneeee has quit
cnk
blackcross: it depends on how you configure your models
ryuneeee joined the channel
I believe the default is on delete cascade
blackcross
so it deletes the whole order object? O)o
ryuneeee has quit
ryuneeee joined the channel
cnk
might. What you probably want is a state column on the items - so you don't delete but set them to unavailable
mattmcc
No, there's no cascading for M2M's.
cnk
and perhaps set the on delete clause to 'prevent'
ahh OK
ryuneeee has quit
so it would only remove the item line from order but not the whole order
still wrong but...
blackcross
mattmcc: so to be clear, the items' list would just have a null reference in it somewhere?
ryuneeee joined the channel
mattmcc
It should remove that record from the intermediate table.
dcrouch joined the channel
Remember, an M2M is just an extra table with FKs to each side of the M2M relationship.
ryuneeee has quit
blackcross
ok, ty
maryokhin has quit
ryuneeee joined the channel
maryokhin joined the channel
MarkusH has quit
ryuneeee has quit
ryuneeee joined the channel
ryuneeee has quit
Abrunacci joined the channel
Browser has quit
jo_
Okay. I'm back. Sorry for the delay.
ryuneeee joined the channel
Browser joined the channel
AndyRez has quit
bsl10 has quit
ryuneeee has quit
ryuneeee joined the channel
the_rat joined the channel
ryuneeee has quit
fero has quit
d42 has quit
esperegu has quit
ryuneeee joined the channel
DrowKiroth joined the channel
kolpal joined the channel
d42 joined the channel
esperegu joined the channel
waqas_ has quit
_Cyclone_ has quit
dlam
anyone ever get "DatabaseError: SSL error: decryption failed or bad record mac"?
ryuneeee has quit
im setting up a new server, and i have postgresql, and im getting that when running a celery job
_Cyclone_ joined the channel
ryuneeee joined the channel
dangayle joined the channel
ryuneeee has quit
jo_
Koterpillar: I've got my B model, which has foreign keys to A and C.
ryuneeee joined the channel
I'd like to return the unique A's along with how many C's are under each A.
B is not registered as a through table.
MarkusH joined the channel
MarkusH has quit
MarkusH joined the channel
the_rat has quit
ryuneeee has quit
I guess I should do distinct on C, then.
But that won't properly roll up the A.
Ehr. Other way around.
ryuneeee joined the channel
Koterpillar
A.objects.annotate(c_count=Count('b__c'))?
ryuneeee has quit
jo_
Tried it. :(
Only getting back one A object.
ryuneeee joined the channel
ycon_ joined the channel
ryuneeee has quit
rtb has quit
ryuneeee joined the channel
slick666_work has quit
ryuneeee has quit
genejacket has quit
ryuneeee joined the channel
dcrouch has quit
Oh. Oooooh.
Our database team is fucking with the database.
So most of the records are missing. :I
That's why I'm only getting one.
Disregard. User error.
MrBulbusMagoo joined the channel
ryuneeee has quit
Omega037
im a decently experience python user about to get started with django
is pycharm my best bet for an IDE?
lorddaedra joined the channel
amcorreia has quit
ryuneeee joined the channel
jessamynsmith
Omega037: I really like pycharm as a python IDE :)
pembo13
Omega037: i personally don't use an IDE, so you can use whatever you used before
well, i didnt know if there were good ones for django
like im going to first build a CRUD application
sandwichheat has quit
some forms and a postgres backend
mattmcc
Django's just Python.
ambar has quit
sandwichheat joined the channel
Omega037
well, its web based
ryuneeee has quit
Koterpillar
mattmcc: and <s>magic</s>metaclasses
dcrouch joined the channel
ryuneeee joined the channel
Omega037
but if you guys all think pycharm is solid, then good
ambar joined the channel
is it worth my buying a license?
jessamynsmith
PyCharm does have specific django support
Quitta has quit
(in the paid version)
ycon_
Omega037: If you're a student, pycharms is free
jessamynsmith
I mean you can set up intellij to do just about everything pycharm does, but it's work
sirjohndfox joined the channel
Omega037
umm, im not a student
ycon_
I've got it , personally I find it a little clunky/slower on osx to Sublime which I'm used to
ryuneeee has quit
emcfins joined the channel
Omega037
i could get work to pay for a license, but im not gonna ask unless i really need it
i was on a macbook, but i got fed up and moved back to a lenovo
ryuneeee joined the channel
lorddaedra has quit
ycon_
Omega037: Lenovo on Linux?
Omega037
no
windows 7
mattmcc
I thought MS sent tactical nukes to people still on Win7 these days.
ycon_
haha
Omega037
not at enterprise
Abrunacci has quit
sandwichheat
I have a test that checks for form validation on a bootstrap modal form. The site works fine, but the test is failing, was wondering if someone could help?