In fact, this whole piece needs to move 3 lines up. If you have django `>= 1.2` it has `settings.DATABASES`. It's only then that we have `settings.DATABASES['mongodb']`. 

This would mean that anybody who's using django `< 1.2` simply can't have authenticated mongo connections.