def clean_api_key(self): if self.cleaned_data['api_key'] != settings.API_KEY: raise forms.ValidationError("Wrong api key")