Slides for a talk I've given over the years (first in 2008, many times since). Talking about good practices contributing to Django and other large open source projects.
a reason. • Go to the top of the project tree. • Then: svn diff (or git diff or ...) – “svn add” works locally • Even if you're a translator or a documenter.
if context_processors.auth is enabled. My main issue with that is that it was incredibly hard to debug for me, when I passed my own 'perms' queryset to a template. ... {% for perm in perms %} {% endfor %} Ticket #8182: Infinite loop iterating over PermWrapper Infinite loop iterating over PermWrapper
This is the same problem as [7597] but for values() field specifications, so this covers the second case where Django adds extra stuff to the select-clause. r7740
.... + def promote_alias_chain(self, chain,...): + """ + Walks along a chain of aliases, promoting the first + nullable join and any joins following that. If + 'must_promote' is True, all the aliases in + the chain are promoted. + """ + for alias in chain: + if self.promote_alias(alias, must_promote): + must_promote = True +
PostgreSQL, Oracle • External backends, too • Separate solution approach into pieces – It has a chance of working and here's a good start. – It has a perfect implementation.
Mac, ... • Some things are hard – File handling, locking, ... – Character encoding • Best defense is “don't do that”. • Next best is a good offense (Research!)
0 and 2 are important • __len__() is eeevviiilll – With good reason – Swallows exceptions • TypeError • Others (Python 2.3, Python 2.6.0 – 2.6.1) • Unicode matters. So does UTF-8