foo: that will blow up in your face if there is no forwarded_for (KeyError)
shallow joined the channel
mekhami_ joined the channel
freitafr_ joined the channel
kezabelle has quit
foo
[redacted]
Hotpot33_ joined the channel
nimomo joined the channel
hop
you could `request.META.get('HTTP_X_FORWARDED_FOR', request.META.get('REMOTE_ADDR', '')`, but pulling it out into a function and giving it more lines would be nicer
hop throws in another )
felixx has quit
damienxx has quit
Hotpot33 has quit
drodger has quit
Dulcin has quit
justanr has quit
ChkDigit has quit
anddam has quit
manfre has quit
EvilDMP has quit
marlinc has quit
orf__ has quit
Rundll has quit
mekhami has quit
SpeakerToMeat has quit
rom1 has quit
freitafr has quit
fletom has quit
sef has quit
Nightwolf has quit
mmb49 has quit
malcom2073 has quit
carloratm has quit
ubernostrum has quit
webpigeon has quit
Wooble has quit
edigiacomo has quit
keyking has quit
brandonw has quit
mfisher has quit
mfisher` is now known as mfisher
EvilDMP joined the channel
damienxx joined the channel
brainpro1 joined the channel
realnot
I used methodField \o/
fletom joined the channel
cseder has quit
mmb49 joined the channel
foo
[redacted]
vdboor has quit
foo [redacted]
blip99 joined the channel
brandonw joined the channel
jgadelange has quit
marlinc joined the channel
zeograd has quit
novigradian has quit
blip99
hi. Modifying a codebase with an existing DB. I see blankable model fields defined without defaults, e.g. `name = models.CharField(max_length=100)` ... shouldn't this produce an error when one applies migrations? or they must've "1) Provide a one-off default now (will be set on all existing rows with a null value for this column)"?
brainproxy has quit
nimomo has quit
hop
foo: it's not the middleware that's bugging you, it's the model
jgadelange joined the channel
zeograd joined the channel
foo: apart from that, i don't see a reason for it not working
cseder joined the channel
rom1 joined the channel
slowly i'm beginning to wander, why this isn't built into django
blip99: if a field can be blank and accepts empty string as an empty values, it will use an empty string as the default without asking for an explicit default
hop
foo: as for your question: clone django-request on github, patch it, install from your own repo instead of the official one. optionally: send PR, hope for inclusion, switch back to the official repo
foo
[redacted]
hop
is still think the PR should work, though
DrYockel has quit
unless it doesn't apply anymore
__marco__ has quit
foo
[redacted]
__marco has quit
NomadJim has quit
re1 joined the channel
re1 has quit
hop
it's only a handful of lines. not too hard to apply manually
felixx joined the channel
blip99
knbk, yeah but in the example i posted, it cannot be blank. they must've ignored the migration warning and filled in temp values
novigradian joined the channel
NomadJim joined the channel
laerus joined the channel
nix64bit has quit
foo
[redacted]
[redacted]
rajesh joined the channel
knbk
blip99: hm right. So the migration file was already created, and you're expecting an error when migrating?
NomadJim has quit
sejo has quit
jessamynsmith joined the channel
geekodour08 joined the channel
novigradian has quit
Itkovian has quit
novigradian joined the channel
DeSigna has quit
hop
foo: you're welcome
sharktopus has quit
jessamynsmith
foo: how is it going?
k0mpa has quit
DeSigna joined the channel
geekodour08
very basic question, what is a good way to filter search? for eg: http://dpaste.com/3WVDG74.txt is there any way in django that can make the `size__eye,size__b,size__bridge` optional? or that has to be done in a lot of if(s)? I wonder how is it done when there is a lot of filter parameters? lots of if statements?
Vapez joined the channel
blip99
knbk, yeah, but the database alrady has this content migrated into it (thus i won't see the error when i apply other migrations). i think that's accurate
yadnesh joined the channel
khomesh joined the channel
knbk
blip99: you can check the migration file to see if it has a default