Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Removed dead code in modelforms.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@15305 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 28d0a0f78840ff82d574c4827d75eda2ce6bf45a 1 parent 227c5e8
Carl Meyer authored January 25, 2011

Showing 1 changed file with 1 addition and 22 deletions. Show diff stats Hide diff stats

  1. 23  django/forms/models.py
23  django/forms/models.py
@@ -21,8 +21,7 @@
21 21
 
22 22
 __all__ = (
23 23
     'ModelForm', 'BaseModelForm', 'model_to_dict', 'fields_for_model',
24  
-    'save_instance', 'form_for_fields', 'ModelChoiceField',
25  
-    'ModelMultipleChoiceField',
  24
+    'save_instance', 'ModelChoiceField', 'ModelMultipleChoiceField',
26 25
 )
27 26
 
28 27
 def construct_instance(form, instance, fields=None, exclude=None):
@@ -92,26 +91,6 @@ def save_m2m():
92 91
         form.save_m2m = save_m2m
93 92
     return instance
94 93
 
95  
-def make_model_save(model, fields, fail_message):
96  
-    """Returns the save() method for a Form."""
97  
-    def save(self, commit=True):
98  
-        return save_instance(self, model(), fields, fail_message, commit)
99  
-    return save
100  
-
101  
-def make_instance_save(instance, fields, fail_message):
102  
-    """Returns the save() method for a Form."""
103  
-    def save(self, commit=True):
104  
-        return save_instance(self, instance, fields, fail_message, commit)
105  
-    return save
106  
-
107  
-def form_for_fields(field_list):
108  
-    """
109  
-    Returns a Form class for the given list of Django database field instances.
110  
-    """
111  
-    fields = SortedDict([(f.name, f.formfield())
112  
-                         for f in field_list if f.editable])
113  
-    return type('FormForFields', (BaseForm,), {'base_fields': fields})
114  
-
115 94
 
116 95
 # ModelForms #################################################################
117 96
 

0 notes on commit 28d0a0f

Please sign in to comment.
Something went wrong with that request. Please try again.