Hi, i want make a view to add elements to a m2m relathionship, i want be able to add 5 at same tame so i think i need to use modelformset_factory, right now my formset display correctly the 5 elements, other think what i want to do is change the queryset for exclude one option but i am not be able to do it: https://dpaste.de/GJWb#L64,65,66,67
garrypolley joined the channel
nicklo has quit
thepeculiarform joined the channel
magicflakes joined the channel
bwreilly has quit
FunkyBob
thepeculiarform: a formset is the right way to go, yes
magicflakes has quit
theshit123: even
olasitarska has quit
Mayhew joined the channel
theshit123
but i have problem giving the queryset
Mayhew has quit
shackra joined the channel
tyfighter has quit
first i think i need tell it the queryset for what fk is it, or not?
mihow has quit
pydonny joined the channel
FunkyBob
one of these days I'm going to sit down and learn formsets...
schinckel
FunkyBob: They are great, for certain sets of problems.
FunkyBob
schinckel: oh, I don't doubt it
schinckel
It’s a shame there’s no supplied FormSetView with CBV though.
jarshwah joined the channel
FunkyBob
even if several major people think they're broken :)
schinckel
link?
mattmcc
schinckel: The stuff in django-extra-views works pretty well.
schinckel
(I’d like to know _how_ they are broken)
mattmcc: Hmm. Don’t think I’ve seen that one.
Ta.
amyrlam has quit
I’ll have to see how they compare to my mixins/base views
FunkyBob
oh, just chats with people, thinking the API is too complex
schinckel
Yeah, it’ probably possible to come up with a nicer API.
IIRC, it took me some time to really grok what to do when.
modelformset_factory() and all that sh*t
FunkyBob
well, since you've done that, perhaps you can help theshit123 :)
mattmcc
You can just not use modelformset_factory if you don't want to.. :)
pjs
Anyone help with an exception? http://dpaste.com/2CQKPND I have a custom middleware to catch this exception. Problem is, this is happening so early in the request processing that Django never actually loads the middleware's, etc. (I guess?) because it's not processed. I tested and verified it's never actually getting there. Any ideas on how to handle this? I'd like to log the error but return a customized template with a 200 error (off hand 500's cause Varn
schinckel
I think I do not use it: but I remember when I was learning how to use them.
pjs: Yeah, there’s no django code running at all in that stack trace.
pjs: Do you know what causes it?
Symon is now known as Symon|away
Oh, hang on, missed those django lines.
pjs: Does the problem persist if you _don’t_ use new relic?
mattmcc
Just blame Graham.
ronkrt
Looking for a python/django developer interested in crypto currencies.. please private message me if this describes you!
windyhouser has quit
pjs
schinckel that's not entirely true, there is Django code running.. and UnreadablePostError is, afaik, a Django only exception (django.http)
codeitloadit has quit
schinckel
Yeah, I missed that. Not enough coffee this morning.
pjs
schinckel occassionally I see it coming from django.core.handlers.wsgi
schinckel
pjs: Do you know what causes it?
pjs
but mostly from the newrelic module
schinckel
(ie, what is wrong with the request?)
pjs
schinckel yea.. some bot that keeps switching IP's, creating connections and dropping the connection mid-request.
windyhouser joined the channel
not a huge issue, but was causing like 50 ISE's a day.. which causes our LB to think the site is unhealthy and display a maintenace page. My middleware took care of 95% of the ISE's but these from high up the chain don't make it to the middleware for some reason
anyways.. this ticket is in our next sprint list and I'm having a hell of a time tackling it.. not really sure what else can be done without actually altering the newrelic module, which is not something I want to do (for obvious reasons)
schinckel
pjs: Can you inspect the request in some other way, perhaps using a WSGI middleware (and prevent it from reaching django)?
pjs: ie, is there something identifying about those requests that you can block?
bmispelon has quit
pjotr
hi. I'm having a field that is of BinaryType, and I want to just download the content as binary file, does Django Admin support this?
pjs
schinckel there is, however they keep coming from different IP's, user agents, etc. Also, this is happening high in the chain before the app can block it with a middleware or something.
faldridge joined the channel
jreyno40 has left the channel
nedbat joined the channel
ronkrt is now known as TheRelic
bradfordtoney joined the channel
Rougeth_ joined the channel
telex has quit
zakwilson has quit
thepeculiarform has quit
telex joined the channel
rthat has quit
rthat joined the channel
siqi_ has quit
sivy joined the channel
jarshwah_ joined the channel
ralph4100 joined the channel
ralph4100
how bad of an idea is it to use 1.7 rc2 in production?
jarshwah has quit
__love__
ralph4100: not that bad
ralph4100
like - it's not particularly a security concern is it?
sivy has quit
caen23 has quit
hell_razer joined the channel
dray3 has quit
FunkyBob
ralph4100: no
hell_razer has quit
schinckel
Wow. I have a form that seems to have picked up a ‘forms’ field from somewhere.
Nizumzen joined the channel
FunkyBob
oops
Dambles has quit
schinckel
(it’s in self.base_fields, so it’s not something I’m doing in __init__)
windyhouser has quit
Aaaaah!
wage_type = forms = forms.ChoiceField(choices=PLEASE_SELECT + Wage.WAGE_TYPE)