[Fixed]-Setting default value for integer field in django models

33👍

The default value in your example is set to string ('0'), but it should be integer. Try this instead:

models.PositiveSmallIntegerField(default=0)
👤plaes

Leave a comment