Skip to content

Commit

Permalink
Fix for #743
Browse files Browse the repository at this point in the history
git-svn-id: http://code.djangoproject.com/svn/django/branches/new-admin@1138 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information
rjwittams committed Nov 9, 2005
1 parent 29cce74 commit b93bab5
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 8 deletions.
8 changes: 2 additions & 6 deletions django/contrib/admin/templatetags/admin_modify.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down Expand Up @@ -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)
Expand All @@ -118,21 +117,18 @@ 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
self.fields = 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)
Expand Down
2 changes: 1 addition & 1 deletion django/contrib/admin/views/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')
}
Expand Down
2 changes: 1 addition & 1 deletion django/utils/httpwrappers.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit b93bab5

Please sign in to comment.