B
B
blackbb2018-08-02 15:25:16
Django
blackbb, 2018-08-02 15:25:16

How to prompt error when migrating django-mttp?

I did everything as in the documentation, according to the example. When migrating, it gives an error You are trying to add a non-nullable field 'level' to page without a default. How can I set this as the default?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vadim Shatalov, 2018-08-02
@blackbb

1. It would be nice to see what you did
2. For the field, add default=... if you need a specific default field, or null=True - then the field will be empty by default, blank=True is enough for text fields

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question