Django 2 Web Development Cookbook
上QQ阅读APP看书,第一时间看更新

How it works...

The getattr(object, attribute_name[, default_value]) Python function tries to get the attribute_name attribute from object and returns default_value if it is not found. In this case, different settings are tried in order to be taken from the Django project settings.py module or, if they are not found, the default values are assigned.