L
L
Lone_Wanderer2020-01-03 18:13:34
Django
Lone_Wanderer, 2020-01-03 18:13:34

Django-filer fails to create the model. What can be done?

makemigrations throws an error

super(FilerFileField, self).__init__(**kwargs)
TypeError: __init__() missing 1 required positional argument: 'on_delete'

Here is the model:
from django.db import models
from filer.fields.image import FilerImageField 

class Book(models.Model):
    title = models.CharField(max_length=200)
    cover = FilerImageField(null=True, blank=True, related_name="book_covers")

Answer the question

In order to leave comments, you need to log in

1 answer(s)
Y
Yura Khlyan, 2020-01-03
@MAGistr_MTM

Django docs

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question