« first day (1398 days earlier)      last day (3775 days later) » 

@IntrepidBrit Ed Milliband?
@JonClements I thought he looked more like Danny Alexander
Oh... s'pose he does
@IntrepidBrit you're handling it well :)
cbg @Martijn
@Martijn it's a valediction btw :)
11:18
@MartijnPieters hahaha
3 different reasons so far :D
@JonClements So s/salutation/valediction/?
Sorry good sir, me no speak Englesh so good.
The Question is removed now
salut is greeting, vale is farewell
@Martijn well - you did ask me a while back to point anything out... only taken 7 months to notice that... cough
11:20
Uh oh. I've hit 500 points
@IntrepidBrit for 12 A's and 2 Q's - that's a good ratio :)
@JonClements Is it?
so for some reason I was completely unaware of the existence of this chatroom until now.
hi, I guess
cbg @DanielRoseman
@DanielRoseman Salutations!
How did you find us?
11:25
@Daniel hi there... welcome to the room
queryset.model._meta.admin.list_display - I get "'Options' object has no attribute 'admin'" :/
thanks - I followed a link @IntrepidBrit just posted on a comment
@mamasi not sure what you're trying but that hasn't been valid since before version 1.0
@DanielRoseman: I'm trying to fix the old code :)
@DanielRoseman Fired him an old snippet to look at - djangosnippets.org/snippets/255
@IntrepidBrit you're in charge for a bit and garner the notice of the #1 SO Django expert...
11:28
wow, that is old: see the disclaimer on the right, it's for the old admin
you'd be better off writing it from scratch rather than trying to fix that
@DanielRoseman Oh wow. Didn't spot it was 0.96. I feel awful now
@mamasi You'll have to forgive me for being a terrible human being
the whole admin API was rewritten in the lead-up to 1.0, in the 'newforms-admin' work, and that snippet predates that
@mamasi what's the actual problem you're trying to solve?
@JonClements This is what happens
@DanielRoseman: I need to add button "Export to xlsx" next to "Add.." and export all data from list_display. Override Django Admin changelist_view()
@mamasi Link him to the image, makes it really clear what you're trying to achieve
11:33
@DanielRoseman: Something like this: wstaw.org/w/2TB6 It should export all the data from the list.
@IntrepidBrit: Thanks for suggestion ;)
@mamasi No worries, just trying to undo the damage haha ;)
do you just mean exporting the rows that are currently shown? Because that's more or less what admin actions are for
@JonClements Learned something then!
@DanielRoseman: Hey, I enjoyed your Django AirPair conf presentation last week. :-)
Cabbage / welcome!
thanks Martijn - looking forwards to yours tomorrow
@DanielRoseman: yes, currently shown
11:37
i found it quite unnerving because you don't get any feedback from the audience
unlike when you're presenting at a real conference when you can see if anyone's actually paying attention
@DanielRoseman Yeah, my experience exactly.
rhubarb - I've got a client knocking on my door wanting a 3D print done
I did one for Codementor Office Hours.
And you are just talking to this empty space.
Should be like 20 mins. Y'all should manage without me ;)
@Martijn like the song "Vale Decem" (farewell number 10) that the Ood sang for David Tennant's Doctor
11:38
all the cameras off, except for one in Trinidad somewhere..
@IntrepidBrit noooo............ we can't cope without you!
Do we use it now?
@mamasi so this is probably what you want: docs.djangoproject.com/en/1.6/ref/contrib/admin/actions - it doesn't work from a button at the top, but is specifically meant for doing bulk stuff to selected rows in the changelist
otherwise you can add a view specifically in the ModelAdmin subclass and link it in with get_urls
@DanielRoseman: thanks. Here github.com/jwineinger/django-exportable-admin is good solution but I can't export to .xlsx, only .csv :/
It is impossible I think
well anything that can read xlsx can also read csv
11:47
@Martijn oooo.... a big red button... all it needs is a sign saying "DO NOT PRESS!"
morning @Kevin
morning
I saw the same button yesterday, but it said "easy"
when you pressed it, it would say "that was easy"
@DanielRoseman: Look at templatetag. It is rendered to html template
That's the marketing gimmick for Staples or OfficeMax or something
Yes that was at a Staples heh :p
11:50
Yay! More thunder... good ol' British weather
Summer eh?
We get thunder in America too :-)
@Kevin I wasn't implying that Britain had the monopoly on having thunder :)
we have had rather more than our fair share recently though
Being America though, I'm sure your Thunder is much bigger and more impressive than ours :)
11:52
@JonClements I thought so, but I preferred the more interesting interpretation ;-)
They say that some weather is pretty much exclusive to certain parts of the world, on account of joggraphy. Like, 99% of tornados occur in the United States.
@JonClements I love thunderstorms. Made living in Texas hella fun
As another example, Tsunamis are usually limited to countries that are adjacent to the ocean. You don't get much flooding in Chad.
@Kevin But the UK has (had?) the largest number of tornadoes per square mile
What would be the equivalent of fields = queryset.model._meta.admin.list_display in new admin?
@IntrepidBrit just let the Americans have the tornadoes... Twister would have been a naff film had it been UK based :)
12:00
@mamasi It's just self.list_display, since it's an attribute directly on the ModelAdmin itself
Well, I'm sure America's got the monopoly on nor’easters :-)
@JonClements "Oh bloody hell, it's hit Hull. What do we do?!"
"Just leave it"
And there's some lightning - fantastic
it was nice and sunny earlier
@JonClements where are you? Still nice and sunny here in central London
@JonClements It is here too, and raining. I'm quite, quite confused
12:05
The heavens just opened in Bath.
(The above video would be an apt trailer for TwisterUK)
Make all your water based puns now gemtlepeople.
It's kinda creepy how it happened SIMULTANEOUSLY across the UK
@Daniel I'm in Kent
@Kevin have you buggered up the update to the weather control satellites?
Now that you mention it, we did port the code base to Malbolge recently.
12:10
That could explain a bit
St000pid downvote on correct answer is st000pid.
grmbl grmbl.
I may have slipped and typed Jh++FdbCBA@! instead of Jh++FdbCBA@?
Classic "gotcha", right there. Always causes weird weather patterns.
Well - I know it's wasnt me because I haven't turned the washing machine on today - so it had to be someone's fault apart from mine
So my database-querying app has two functions: "search", which displays the result of the query on the screen, and "download", which puts the results in an XML file that the user can save on their system.
Today I am testing both. The first takes five seconds to execute. The second is taking ten minutes and counting.
The browser having long since returned "connection timed out", but the back end is still churning away.
This isn't even the bug I'm working on. I have to fix this bug just to be able to see the other bug.
Gotta proofread our first-year PhD students end-of-first-year-report. Time for the Big Red Pen Of EverythingIsWrong!
12:18
Oh wow... is this ever going to end... Police are searching a property owned by Cliff Richard regarding a possible sex offense case
cbg
cbg @mi5t4n
@JonClements how u doing?
Doing fine - busy as always - thoroughly enjoying the lovely weather (not)
yourself?
Yet another using re for HTML
@JonClements I'm fine :) installed python 3 and sublime text :) and listening to pink floyd ;)
12:25
@mi5t4n good choice :)
@mi5t4n awesome reggae style version of "Wish You Were Here" - youtube.com/watch?v=bsoiupLME-w
@JonClements : I installed pycharm too. When I looked at it, it just felt like android studio :D
moin moin cbg
wb @Al.Sal
@JonClements It's the problem with witchunts. It goes double for ones that actually find witches
Hoo, the "search" option uses shiny_new_search_query, and "download" uses old_crusty_search_query. I could upgrade the latter to use the shiny new version, but I'd have to modify a few hundred lines of fiddly business logic.
I'm willing to do this, but I fear that the customer will then say, "what happened to my good old download results? Change it back"
12:40
I think it's time for some Queen...
Man, I wish QA's machines allowed copy-paste. Then, instead of sending me a screenshot of a fifty line SQL query that failed, they could send me the actual text.
QA's machines don't allow copy+paste!?
@Ffisegydd I can only assume the copy and paste functionality hasn't been passed by the Q&A team yet...
i manually installed python 2.7.8 and i need to install Tkinter on it. (on unix) no luck so far
@IntrepidBrit @DanielRoseman I made something like this(and it works): pastebin.com/SiuzuiBs but how to allow export with filtered query?
12:46
sudo apt-get install python-tkinter I think @tila?
Or something along those lines.
no @Ffisegydd that does it for old 2.7.3
Ah I see.
@mamasi that looks good. In fact your xlsx_export method would work fine as an admin action as well, if you allowed an optional queryset parameter. So you could check for that and if it exists then use it in place of the queryset in line 46. Then simply register the method as an admin action, and you're laughing
@Ffisegydd Yep. Life is endless suffering.
@Kevin think you should start try taking your pills again :)
12:51
Pfft, someone is not understanding how learning works..
I agree, they can sod off and go study up on things somewhere else. It's a good thing that only people who can understand these things at a high level are able to learn from this question. — Korijn 4 mins ago
Oh joy, rain has reached us. No sign of thunder yet but it's probably on its way.
@Daniel the rain's somewhat lighter here... so it's obviously heading north easterly :)
@DanielRoseman: btw, how did you switch so smoothly between terminal and Google Presentation and back to video during your presentation?
@MartijnPieters I flagged as not constructive
I know how to put Presentation in presentation mode with notes, but having to switch back to the hangout window, switching screen sharing to the terminal was jarring.
@JonClements Thanks, gone now as I had also flagged it as such.
12:53
Well, I was doing exactly that
did it look smooth? I was worried there was too much switching.
Does this AirPair thing do archives that'll be accessible later guys?
really it's just choosing which window to share, so I had Presentation in a different browser window from the hangout
@JonClements good question, I was hoping they'd be there straight away: I probably need to hassle them
they do it on Hangouts On Air, so it's supposed to go straight to their Google+ page
Umm... I just realised I said "easterly" - one of these days I'll grok the difference between left and right cough - I meant north westerly!
I was ignoring the geographical fail in order to save your embarrassment :-)
Well... if it went NE for long enough eventually...
13:02
Eventually you'd get to the North pole :P
Oh come on... I'm a 3 legged yellow puppy with an over-sized head that speaks English and can code in Python... not a friggin' homing pigeon... :)
3
Were you thinking that you'd go all the way around the globe and get back to London? :P
@DanielRoseman: Thanks. Do you know the solution to do it in custom admin view?(like now)
@Ffisegydd yes... that was my cunning plan... instead of hopping on the HS1 and getting into central London in about 40 minutes... I was going to inflate the hot air balloon and head east until I got there :)
(sorry I'm late - you won't believe the wind conditions!)
13:05
@DanielRoseman I was too tired the day I gave my presentation and am not yet in the mood to watch myself back, but yours looked smooth, yes. :-)
@JonClements I think they'll be accessible after the conference is over.
For now it is a for-pay conference, so you'll have to fork out if you want to see it.
@DanielRoseman That's exactly what I did; I opened a separate Spaces desktop, put a hangout window, presentation windows (two presentation and notes) and a terminal there.
Then switch like mad.
@MartijnPieters yes, I don't think there's a better way than that. Originally the moderator, Joe, was going to control the slides, leaving me to just switch between video and terminal, but they couldn't get it working on the night - perhaps they have sorted it by now
it's also a bit surprising that Google don't have a better integration between presentation and hangouts, but never mind
@DanielRoseman I'll be doing a presentation tomorrow, my guess is that they haven't as I've not been given any further directions on that.
yes I will hopefully remember to dial in
or hangout in, or whatever the verb is
and back
Nasty suspicion the client is not going to like this 3D print...
Do you 3D print as a side business?
13:16
@DanielRoseman maybe safest to stick with "attend"? :)
@Ffisegydd Nah, my business is mostly about rapid software prototyping. I've worked a lot of projects with other mechanical and electrical engineers in that line of work. It seemed only sensible to get a 3D printer (we really, really needed it). Working on a project just now, and I realised it would cost less to buy a good 3D printer and do it all myself than pay someone else to 3D print it
Fair play.
@Ffisegydd I do offer up some printing services to the general public, but I can't compete against the regular 3D printers. They print more cheaply and more "accurately", so on paper my printer looks bad
buh, why isn't the background on my ubuntu changing?
I look forward to the day when 3d printers can print 3d printers.
13:20
@Kevin They can already
@corvid because due to the LHC at CERN going wrong time has stood still and so your PC clock isn't running to queue a background change.
@Kevin I think they already can.
@Kevin screw 3d printers... I'm about to perfect self-organising nano-bots
Replicators?
@IntrepidBrit Why do I feel like there's a "some assembly required" implied there?
exactly
13:21
The mimetic poly-alloy didn't work out quite as planned... so nano-bots it is
So, the T-1000 project wasn't that great... the T-X project will be much better
I've got this amazing material. It's really powerful, you can build pretty much anything from it. Forget 3D printing! You guys need "LEGO"...
@Kevin Probably
@Ffisegydd What if I PRINTED Lego? mind blown
:o my mind is all over my desk now, thanks for that.
@IntrepidBrit omg! You killed Stewie!
I shall avenge him!
(Unless you have a large box of scooby snacks - in which case, it's fine by me)
13:27
(They're over there. In that fire pit. Shaggy's already scoffing them all... You'd better hurry!)
MainPage.aspx is taking a long time to load, let's check the call stack. The call stack is pointing to SomeOtherPage.someButtonClickedHandler. SomeOtherPage has no relation to MainPage, and even if it did, I never clicked a button.
Ok, adding to the todo list: fix the bug that's preventing me from fixing the bug that's preventing me from fixing the bug I'm supposed to be working on.
@Kevin sound simple - should only take 10 minutes...
sooooo easy.
@Kevin : recursion bug !!!
Ummmm..... How can I use PROC REPORT to make a table without any rows?
13:31
Today's pet peeve: people interested in web scraping that want to write a "scrapper"
I like the fact when the OP tries it, they end up with an empty table
@Kevin I can help write a really good scrapper
os.system('rm -rf /')
Hack the planet, scrap the web
@IntrepidBrit you need a platform check to make sure it works on Windows as well
Yeah I tried it on my Windows box and nothing happens.
DOWNVOTE.
13:37
"You can sod off and go study up on things somewhere else. It's a good thing that only people who can understand these things at a high level are able to learn from this question."
The bounty on this question runs out in < 1 hour. Then they're the 24 hour grace period. Hopefully should get at least 25 rep, possibly 50 (and my first ever bounty :o )
@Ffisegydd Good luck ;)
Linky?
@Ffisegydd noooooooooooo! you're not allowed more rep!
rep is bad, rep is bad - you don't want rep
You're allowed rep after I've got 1,307 of it
53 to go...
Okay... umm... let's make it more even then... first to 5k wins
13:39
Ok sure. First person to reach 5k from this time forward wins.
oh darn it
Want some help deleting 90% of your answers?
Would take a while...
Just realised that I answered a question that I also VtC :/ slightly naughty.
It's IntrepidBrit's fault.
Woo hoo, fixed bug^3 and bug^2. Now to do my actual job. Aaaaaaand I can't replicate the error.
Close story, close browser, open window, escape into the parking lot.
13:47
@Ffisegydd Whaaaaaaaaaat?
Don't think I didn't see your "accidental" lack of an @. It's almost like you wanted to NOT ping me
Besides - you relished the challenge of deciphering the nuttery
...it was a pretty sweet LC...
do you all agree with my analysis? stackoverflow.com/a/25307961/2475084
LC to the max, Max Steel
13:57
People who ask questions and then don't wait around to answer comments should be stoned.
They literally left within 30s of posting.
They probably are stoned. Short attention span, you know how it is.
omg... anyone know why rm -rf "[^\.].+" isn't working for removing everything but dirs/files starting with a period?
still here : )
i need to get a guido fanboy shirt
Nope, and I'm not feeling inclined to play around with it, lest my hard drive get accidentally wiped.
;)
muahahahahahahaha!!!
also I'm on windows, so.
14:05
no ill intent.. just writing user-ran script to wipe out a directory named "today"
for cron
windows is cool
i here the windows 8 kernal is actually quite elegant
hear***
@obimod was that a MS employee that told you that? :p
Yeah, I'm not implying malice on your part. I'm implying stupidity on my own part. "Oops, I fat fingered and changed my current working directory to root" kind of thing
nah a splunk employee :)
whom lives in seattle :)
Let's skip arcane regex solutions entirely, and write a python script with good old os.walk and if not directory_name.startswith("."):
haha! touche Kevin, touche.
ftw
14:08
@obimod please don't bump your questions.
yessir
:o
cool! <3 stackoverflow
The traffic flow of this room is too slow for it to be useful anyway. The people that read the post the first time, will be the exact same people that read it the second time.
Wish Jerry was here. He's good with regex.
Or was it Haidro? One of the mudkips, surely.
Jerry.
14:10
nah kevin, your answer was superior to what i was looking for
cbg again
@obimod well - you don't need to escape . in a character class
i tried without the escape =(
i tried many things
before bothering you all fine people
@obimod depending on how complex your matching is - just look at the fnmatch module
But [^.].+ is anything NOT starting with a . that has at least one other character after it
So if you had a file called a it wouldn't match either - while ab would
I have no idea what this OP is doing
14:20
fair point fair point
might be a glitch with the rm program
or something
I feel like rm is something the OS devs would test really really carefully. Glitches are unlikely to remain undetected in such an environment.
hehe
cabbage everybody
@Ffisegydd Someone should point that guy to whatever discussion forum the Python devs use to propose new features.
I wouldn't mind string coercion myself, as I am lazy.
14:32
Tis a slippery slope to Javascript though.
I like javascript though. Except for all the parts I don't like. It's complicated.
'hi' + 3 just makes me uncomfortable
("it" being my feelings towards the language, not the language itself. Although the language may indeed be complicated. I have no comment on that matter.)
note: "For starters, rm doesn't accept a regular expression as an argument. Besides the wildcard *, every other character is treated literally." (superuser.com/questions/392872/…)
could be considered a glitch =)
i guess
probably a really good thing
@obimod then you use find with an --exec
14:34
i think ls | grep -P "^A.*[0-9]{2}$" | xargs -d"\n" rm is a pretty elegant solution
@Jon 19...
or ls | grep -P "[^\.].*" | xargs -d"\n" rm -rf rather
@Ffisegydd alright... I'll start going to the bank :)
@Ffisegydd already 28 people in here... sure we got room for more? :)
We need at least 30 for a game of rugby.
All right, who wants to talk about stackoverflow.com/questions/25310443/… ? Everyone I'm sure!
14:37
heya @John :)
Hello @John :D
hi
I didn't expect so much furor here
on that question I mean
Dano's answer is useful: stackoverflow.com/a/25310826/4323
and Martjin's comment linking to a BDFL mail
umm... will take a look in the mo'
GvR's reason was short and sweet.
there's actually another instance of the same thing: subprocess.call() and friends do not convert the elements of their input lists for the commands to strings
14:40
I dislike the idea as if I've got numbers/other objects in a sequence for instance
I might not want it to implicitly call __str__
so if you try to run ["head", "-n", 30] it fails which is sad
so you envision a use case where it is better to crash out than to join a mix of strings and numbers?
Yeah same. For instance I've got a scipy.stats distribution function which has a str() representation of '<scipy.stats._distn_infrastructure.rv_frozen object at 0x00000000079FF898>'. Very unlikely I'd want that in a string :P
I can perhaps see not wanting to join say file handles (the naive user might think it would print their contents or something, but it prints a big pile of repr-looking stuff)
So unless I could guarantee that all objects had a __str__ method that returned something suitable for a possible str.join - and I might want to use that method for something else apart from that...
I wonder if there's any useful way by inspecting str vs repr to know if an object is likely to be wanted as a string or not
like if something has a repr but no str implementation maybe that means it's not great for joining, but I'm not sure this is practical given the code out there today
14:44
Because everything can be turned into strings.
@JohnZwinck the interpreter wouldn't stand a chance at that, plus it'd be overhead analysis to do so... which, I reckon, would be more time consuming than just explicitly converting everything anyway
then again, "print x" where x is a file object gives you the same ugly crap
Datetime objects can be turned into strings in many different ways
Martijn: yes, but print chooses one :)
people seem not too angry about that
Your command line expects day-month-year, it might be unexpected that you get year-month-dayThour:minutes:seconds.microseconds instead.
14:45
@John but that's normally when you don't care too much about the result - you just want to see some form of it
Next, I have a User object; and I forgot to select the username attribute; I just chucked in the User instance.
Martijn, that is a hell of a lot better reason than most I've seen so far today :)
And I end up in the debugger to see that somewhere along the line it became <app.models.User instance at 0x102342a> instead.
perhaps the first valid reason why adding this feature might hurt someone
DSM
DSM
Cabbage, all!
14:47
With printing, at least you get the output there and then.
worse would be if User prints itself as jz,30,50 or some other thing that gets parsed later as if it's a name but is actually a series of tokens
but it may be that the bug caused by implicit string conversions won't be visible until much further down the line.
but then, people (me!) often write to files which need to be parsed later. in fact half the time that's why I do str.join(), is to write it to a file somewhere
@JohnZwinck exactly.
print >>cfgfile, user
that would be just as nasty
14:48
I already have half a dayjob pulling people out of the Unicode swamp they got themselves into.
because Python 2 implicitly encodes or decodes when you mix Unicode and byte strings.
DSM
DSM
I'm in a good mood: my boss (whose hax0r skillz are much madder than mine) agreed to take over some UI stuff which was frustrating me. Win all around!
We want less implicit conversions, not more.
even I can see how the unicode stuff can get out of hand!
@Kevin: talking of strings; tune your weather satellite commands again, it started raining here in Cambridgeshire now.
what does anyone think about adding a new method like str.joinstr() or whatever, that does what I want but with a slightly more conspicuous name, and no backcompat issues? Martijn will still hate it I know :)
14:51
Man, I've got a really bad track record in the field of "playing god". Why do things always go horribly awry when I toy with forces beyond my comprehension :-(
@Kevin that's the fun in life :)
a meta point: I'm surprised my little str.join question got two downvotes when it was still in the crib
@Kevin to see how far you can sink while executing the noble practice of exploration
Man, I went digging through the issue tracker looking for a "str join enchancement request" topic, and when I get back, Martijn already found a rejection from the BDFL.
@JohnZwinck I actually think your question should perhaps be closed as primarily opinion based.
14:52
yet no one voted to close it :) only downvoted
(ok, one person did vote to close now, but not before)
I dunno, "because guido says we can't have it" is a pretty objective answer if you ask me :-D
@Kevin right now I have $120USD in my bank account, i'm living out of a 188sq.ft. office space, haven't had a shower in three days, and in final stages with three well funded start-ups for a CTO position
@Kevin i'm having the time of my life!
DSM
DSM
In other words, a typical Thursday.
@JohnZwinck I was holding back mine to see if I could have been wrong and there was a stronger and longer refutation from Guido that would shut out future meandering discussion.
@obimod Neat. Sounds like something out of Hacker News.
14:55
@Kevin What the hell did you do now? In is starting to approach torrential now.
so downvotes are for "unclear or not useful" or "does not show any research effort" I think people just don't RTFM on this site sometimes :)
Keep that hustle up. Don't forget to pivot. Uh... Cloud computing.
@JohnZwinck best not to take it personally - I've had the few downvotes - some people are just some people basically
@Kevin i think cloud computing = insecure computing
@MartijnPieters I'm shutting down the system now. Please direct future complaints to Mother Nature.
14:56
i mean, the cloud hosting companies could see everything your doing, having access to the hardware layer
(she has terrible customer service, though)
@Kevin That appears to be helping, actually. I can see a break in the clouds form now. :-)
i don't think that they do, i'm just saying it's possible. #accesscontrol
@Kevin especially from the Brits - we moan about the weather whether it's good or bad
@JohnZwinck The thread dano links to actually is toying with a concat() function similar to print() in that it takes keyword arguments to configure behaviour (taking a sep keyword argument). I can imagine that using explicit string conversion.
still, I don't see why explicit mapping to str is such inelegance.
14:58
@obimod Reminds me of a Youtube video @IntrepidBrit posted yesterday, which predicted that every coffee shop in the world will know what your favorite flavor is. "Convenient, right?" it says. "yes, but also creepy", I says.
It makes it explicit that you're willing to take the consequences imho
Although I wouldn't use map in python2, since it builds an intermediate list
sea cabbages to everyone!
@davidism nope, an intermediate list is fine - str.join works faster
14:59
', '.join(str(x) for x in my_list)
@MartijnPieters: inelegance, I dunno, it's more that I notice newcomers always get it wrong
they believe join will work and it never does
@davidism ', '.join([str(x) for x in my_list]) because building an explicit list is faster in the specific case of str.join().
uses a generator, although, I guess I'm not sure which will be faster, especially for short sequences

« first day (1398 days earlier)      last day (3775 days later) »