fix AttributeError: 'Form' object has no attribute 'settings'