generate_settings_key changed to works without django