﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
30857	When subclassing a model field, `max_length` cannot be passed as an argument to `self.__init__`.	Robin (Robert) Thomas	nobody	"
{{{
class MyCustomField(models.CharField):
    def __init__(self, *args, **kwargs):
        super().__init__(max_length=60, *args, **kwargs)

class MyModel(models.Model)
    address_state = MyCustomField()
}}}

On attempting to migrate, I get:

{{{
super().__init__(max_length=60, *args, **kwargs)
TypeError: __init__() got multiple values for keyword argument 'max_length'
}}}

Using `kwargs[max_length]` works just fine. However, the documentation says that `max_length` should be able to be passed to `super().__init__()` as an argument:

https://docs.djangoproject.com/en/2.2/howto/custom-model-fields/#writing-a-field-subclass

Either the documentation is incorrect, or this is a bug."	Bug	closed	Documentation	2.2	Normal	invalid	models fields		Unreviewed	0	0	0	0	0	0
