please use getattr to allow local_settings overloading.  You'll also need to define this variable in the non-Pi case.