WD5 - разработка сайтов

Решение: RemovedInDjango18Warning: Creating a ModelForm without either the 'fields' attribute or the 'exclude' attribute is deprecated

Ошибка вида

RemovedInDjango18Warning: Creating a ModelForm without either the 'fields' attribute or the 'exclude' attribute is deprecated

Решение в мета информацию модели добавить fields = []

class MyModelAdminForm(forms.ModelForm):
    content = forms.CharField(widget=CKEditorWidget)

    class Meta:
        model = MyModel
        fields = '__all__'  # Or a list of the fields that you want to include in your form
None
Яндекс.Метрика