Ticket #4694: get_form_field.diff
File get_form_field.diff, 655 bytes (added by , 17 years ago) |
---|
-
django/db/models/base.py
417 417 setattr(self, cachename, get_image_dimensions(filename)) 418 418 return getattr(self, cachename) 419 419 420 def get_form_field(cls, name, **kwargs): 421 return (f for f in cls._meta.fields if f.name == name).next().formfield(**kwargs) 422 get_form_field = classmethod(get_form_field) 423 420 424 ############################################ 421 425 # HELPER FUNCTIONS (CURRIED MODEL METHODS) # 422 426 ############################################