﻿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
26369	Allow override of hardcoded defaults in model Field.formfield()	James Pic	nobody	"Currently, the model field builds the default form field that's used
by the modelform metaclass in Field.formfield(). It uses hardcoded defaults which it would be nice to be able to override with attributes.

Example patch: https://github.com/jpic/django/commit/d102f362f3c1ceaf2d5224d71f788c0821a481ae

This patch allows to use Radio widget by default for a OneToOne field:

{{{
    class TestModel(models.Model):
        name = models.CharField(max_length=200)

        test = models.OneToOneField(
            'self',
            null=True,
            blank=True,
            related_name='related_test_models',
            # This seems like it would always be useful
            formfield_defaults={
                'widget': forms.RadioSelect
            }
        )
}}}"	Cleanup/optimization	new	Forms	1.9	Normal				Unreviewed	0	0	0	0	0	0
