﻿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
7993	Admin complains about a missing field even if it is not missing	Ivan Giuliani	nobody	"Django raises an `ImproperlyConfigured` exception ({{{NewsAdmin.fieldsets[1][1]['fields']}}} refers to field {{{`pub_date`}}} that is missing from the form) when the following admin interface is defined:

{{{
#!python
class NewsAdmin(admin.ModelAdmin):
    fieldsets = (
        (None, {
            'fields': ('title', 'text'),
        }),
        (_('Other stuff'), {
            'fields': ('language', 'pub_date'),
        }),
    )
}}}

But the model '''has''' a pub_date field:

{{{
#!python
class News(models.Model):
    title = models.CharField(max_length=50)
    pub_date = models.DateTimeField(auto_now=True, blank=True)
    text = models.TextField()
    language = models.ForeignKey(LanguageRef)

    def save(self):
        if not self.pub_date:
            self.pub_date = datetime.datetime.now()
        super(News, self).save()

    class Meta:
        get_latest_by = ""pub_date""
        verbose_name = ""news""
        verbose_name_plural = ""news""
}}}

If I remove `pub_date` from the `fields` attribute in the `NewsAdmin` everything works as expected."	Uncategorized	closed	contrib.admin	dev	Normal	invalid	admin, improperlyconfigured		Unreviewed	0	0	0	0	0	0
