What's the preferred method for accessing settings information in Django?
When accessing a setting defined by your app in your apps' defaults, I'd suggest if settings.name: - the default is defined by you already. On the other hand, when writing an external app - I'd suggest if hasattr(settings, 'name'): - you can't expect your apps users will define all the defaults.
Please chime in if there are other methods but the ones I see most often are these two and they both exist in the django source.

if settings.DEBUG:

and

if hasattr(settings, 'POSTGIS_VERSION'):

The later has the advantage of having a default but in cases where a default would be an error (something is missing) is it better to use the first version? What's the rule on defaults, when should you put it in the settings.py file and when should you include it directly in the source like above?