﻿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
26702	Document custom field subclass change requires new custom field class	Baylee Feore	Baylee Feore	"Related to #26586

Can't alter a custom field to have a different base field type. Documentation should be updated to reflect this and proposed solution. 

Example before state:
{{{
class CustomCharField(models.CharField):
    def foo(self):
        pass

class Author(models.Model):
    name = CustomCharField(max_length=255)
}}}

Example of what won't work: 
{{{
class CustomCharField(models.TextField):
    def foo(self):
        pass

class Author(models.Model):
    name = CustomCharField(max_length=255)
}}}

Example of what you should change to:
{{{
class CustomFieldMixin(object):
    def foo(self):
        pass

class CustomCharField(CustomFieldMixin, models.CharField):
    pass

class CustomTextField(CustomFieldMixin, models.TextField):
    pass

class Author(models.Model):
    name = CustomTextField(max_length=255)
}}}

Should also include link to: https://docs.djangoproject.com/en/1.9/topics/migrations/#considerations-when-removing-model-fields to explain why user must keep old field definition around."	Cleanup/optimization	closed	Documentation	1.9	Normal	fixed			Ready for checkin	1	0	0	0	0	0
