News for hackers. Stuff that matters.
Re:Tips to a new django developer by jksmith on Monday August 31, 2009 @03:40PM (#796562)
Please, for the love of conciseness, never assign a boolean based on an if statement.
Re:Tips to a new django developer by dmoho on Monday August 31, 2009 @03:54PM (#796589)
What if the assignment to the boolean was only one of the things you wanted to execute based on the result of the if statement?
Re:Tips to a new django developer by jksmith on Monday August 31, 2009 @05:50PM (#796803)
Even then, I'd rather see:

DEBUG = socket.gethostname() == 'developmentcomp'

if DEBUG then...

Re:Tips to a new django developer by rbanffy on Monday August 31, 2009 @04:33PM (#796661)
It's not
Re:Tips to a new django developer by aichcon on Monday August 31, 2009 @04:20PM (#796634)
How would you rewrite it?
Re:Tips to a new django developer by jpeterson on Monday August 31, 2009 @05:01PM (#796711)

  DEBUG = socket.gethostname() == 'developmentcomp'