google-code-export / dojango

Automatically exported from code.google.com/p/dojango
Other
1 stars 0 forks source link

Dojango tries to use attributes removed from django.forms.model #75

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

from dojango.forms import widgets

What is the expected output? What do you see instead?

  File "/srv/my_forms/widgets.py", line 5, in <module>
    from dojango.forms import widgets
  File "/srv/dojango/forms/__init__.py", line 4, in <module>
    from models import *
AttributeError: 'module' object has no attribute 'form_for_fields' # this 
attribute (and others) ceased to exist in Django r15305

What version of the product are you using? On what operating system?
Dojango trunk, Django trunk :-), Python 2.7

Please provide any additional information below.

Please take look on http://code.djangoproject.com/changeset/15305.

Original issue reported on code.google.com by zim...@gmail.com on 9 Feb 2011 at 1:43

GoogleCodeExporter commented 9 years ago
fixing this is extremely simple - just remove form_for_fields from 
forms/models.py:

 Index: src/dojango/dojango/forms/models.py
 ===================================================================
 --- src/dojango/dojango/forms/models.py    (Revision 282)
 +++ src/dojango/dojango/forms/models.py    (Arbeitskopie)
 @@ -15,8 +15,7 @@

  __all__ = (
      'ModelForm', 'BaseModelForm', 'model_to_dict', 'fields_for_model',
 -    'save_instance', 'form_for_fields', 'ModelChoiceField',
 -    'ModelMultipleChoiceField',
 +    'save_instance', 'ModelChoiceField', 'ModelMultipleChoiceField',
  )

  class ModelChoiceField(DojoFieldMixin, models.ModelChoiceField):

Original comment by chris.vigelius on 31 Mar 2011 at 2:21

GoogleCodeExporter commented 9 years ago
Release 0.5.2 plz

Original comment by michal....@gmail.com on 12 Apr 2011 at 3:29

GoogleCodeExporter commented 9 years ago
fixed in r284. Thanks for the report.

Original comment by tobias.k...@googlemail.com on 14 Apr 2011 at 4:58

GoogleCodeExporter commented 9 years ago
And closing it :)

Original comment by tobias.k...@googlemail.com on 14 Apr 2011 at 4:59