def get(self, form=None): current_settings = Settings.get_by_key_name(config.SETTINGS_KEY) if current_settings: current_settings = current_settings.to_dict() current_settings['allowed_ips'] = ','.join(current_settings['allowed_ips']) else: current_settings = Settings.reset_auth(config.SETTINGS_KEY); if form is None: form = SettingsForm(current_settings) self.response.out.write(template.render(os.path.join(config.APP_ROOT_DIR, "templates/index.html"), {"no_settings" : (current_settings is None), "form" : form, "title" : "Mail Engine for App Engine"}))