Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix for #743

git-svn-id: http://code.djangoproject.com/svn/django/branches/new-admin@1138 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit b93bab5ca1aee6e608904c97c8f70206b2bcde5e 1 parent 29cce74
@rjwittams rjwittams authored
View
8 django/contrib/admin/templatetags/admin_modify.py
@@ -43,7 +43,7 @@ def submit_row(context, bound_manipulator):
}
submit_row = inclusion_tag('admin/submit_line', takes_context=True)(submit_row)
-#@simple_tag
+#@simple_tag
def field_label(bound_field):
class_names = []
if isinstance(bound_field.field, meta.BooleanField):
@@ -92,7 +92,6 @@ def get_nodelist(cls, klass):
return cls.nodelists[klass]
get_nodelist = classmethod(get_nodelist)
-
def render(self, context):
bound_field = template.resolve_variable(self.bound_field_var, context)
@@ -118,8 +117,6 @@ def use_raw_id_admin(self):
return isinstance(self.field.rel, (meta.ManyToOne, meta.ManyToMany)) \
and self.field.rel.raw_id_admin
-
-
class FormFieldCollectionWrapper(object):
def __init__(self, field_mapping, fields):
self.field_mapping = field_mapping
@@ -127,12 +124,11 @@ def __init__(self, field_mapping, fields):
self.bound_fields = [AdminBoundField(field, self.field_mapping, field_mapping['original'])
for field in self.fields ]
-
class TabularBoundRelatedObject(BoundRelatedObject):
def __init__(self, related_object, field_mapping, original):
super(TabularBoundRelatedObject, self).__init__(related_object, field_mapping, original)
self.field_wrapper_list = self.relation.editable_fields(FieldWrapper)
-
+
fields = self.relation.editable_fields()
self.form_field_collection_wrappers = [FormFieldCollectionWrapper(field_mapping ,fields)
View
2  django/contrib/admin/views/main.py
@@ -189,7 +189,7 @@ def choices(self, cl):
'display': k
}
if isinstance(self.field, meta.NullBooleanField):
- yield { 'selected' : lookup_val2 == 'True',
+ yield { 'selected' : self.lookup_val2 == 'True',
'query_string' : cl.get_query_string( {self.lookup_kwarg2: 'True'}, [self.lookup_kwarg]),
'display': _('Unknown')
}
View
2  django/utils/httpwrappers.py
@@ -204,7 +204,7 @@ def flush(self):
def tell(self):
return len(self.content)
-
+
class HttpResponseRedirect(HttpResponse):
def __init__(self, redirect_to):
HttpResponse.__init__(self)
Please sign in to comment.
Something went wrong with that request. Please try again.