mpen
mpen

Reputation: 282825

Where in the source is the Model Field -> Form Field specified?

ala this page http://docs.djangoproject.com/en/dev/topics/forms/modelforms/#field-types

Basically, I have a bunch of model field objects, and I want to find the corresponding form field that django uses by default.

Upvotes: 0

Views: 127

Answers (1)

Ignacio Vazquez-Abrams
Ignacio Vazquez-Abrams

Reputation: 798536

It's set via the Field.formfield() method. The field classes themselves are defined under django/db/models/fields.

Upvotes: 3

Related Questions