﻿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
22413	Allow model instance attributes in ModelAdmin.fields	Moritz Sichert	Moritz Sichert	"Say your model uses `__getattr__` like that:

{{{
class MyModel(models.Model):
    value = models.CharField(max_length=20)

    def __getattr__(self, name):
        if name == 'reversed_value':
            return self.value[::-1]
        else:
            raise AttributeError()
}}}
Then you can't use the attribute `reversed_value` in `ModelAdmin.fields` because the attribute is only defined in a model '''instance''' but not in the class itself.
I suggest adding a field `model_instance_fields` in `ModelAdmin` that contains the names of all fields that will be only defined in model instances."	New feature	closed	contrib.admin	dev	Normal	wontfix	ModelAdmin instance attribute field		Unreviewed	1	0	1	0	0	0
