Saturday, April 23, 2016

Django | __init__() got an unexpected keyword argument 'maxlength'

TypeError: __init__() got an unexpected keyword argument 'maxlength'

This problem arises when you are using a newer version of Django. Since 1.0 (or actually, somewhere in 0.97) Django switched to max_length instead of maxlength.

So, replace maxlength with max_length




If you enjoyed this post, make sure you subscribe to my RSS feed! Comments are encouraged

No comments:
Write comments