diff --git a/django/conf/locale/de/LC_MESSAGES/django.mo b/django/conf/locale/de/LC_MESSAGES/django.mo
index 19a3206ac2..b4cec0fc01 100644
Binary files a/django/conf/locale/de/LC_MESSAGES/django.mo and b/django/conf/locale/de/LC_MESSAGES/django.mo differ
diff --git a/django/conf/locale/sr/LC_MESSAGES/django.mo b/django/conf/locale/sr/LC_MESSAGES/django.mo
index 377461bbf7..ac5583b326 100644
Binary files a/django/conf/locale/sr/LC_MESSAGES/django.mo and b/django/conf/locale/sr/LC_MESSAGES/django.mo differ
diff --git a/django/contrib/admin/templatetags/admin_list.py b/django/contrib/admin/templatetags/admin_list.py
index 78eee4c85e..698607f44d 100644
--- a/django/contrib/admin/templatetags/admin_list.py
+++ b/django/contrib/admin/templatetags/admin_list.py
@@ -210,6 +210,7 @@ def items_for_result(cl, result):
if first: # First column is a special case
first = False
url = cl.url_for_result(result)
+ result_id = getattr(result, pk)
yield ('
%s | ' % \
(row_class, url, (cl.is_popup and ' onclick="opener.dismissRelatedLookupPopup(window, %r); return false;"' % result_id or ''), result_repr))
else:
diff --git a/django/core/formfields.py b/django/core/formfields.py
index f242ed3415..2bfc50a9f4 100644
--- a/django/core/formfields.py
+++ b/django/core/formfields.py
@@ -109,6 +109,7 @@ class FormWrapper:
def __getitem__(self, key):
for field in self.manipulator.fields:
+
if field.field_name == key:
data = field.extract_data(self.data)
return FormFieldWrapper(field, data, self.error_dict.get(field.field_name, []))
@@ -117,8 +118,7 @@ class FormWrapper:
for inline_collection in self._inline_collections:
if inline_collection.name == key:
return inline_collection
-
- raise KeyError
+ raise KeyError("Could not find Formfield or InlineObjectCollection named:%s" % key )
def fill_inline_collections(self):
if not self._inline_collections:
diff --git a/django/core/meta/fields.py b/django/core/meta/fields.py
index 43a2acca05..b7525a47cb 100644
--- a/django/core/meta/fields.py
+++ b/django/core/meta/fields.py
@@ -402,6 +402,13 @@ class DateField(Field):
return datetime.datetime.now()
return value
+ # Needed because of horrible auto_now[_add] behaviour wrt. editable
+ def get_follow(self, override=None):
+ if override != None:
+ return override
+ else:
+ return self.editable or self.auto_now or self.auto_now_add
+
def get_db_prep_save(self, value):
# Casts dates into string format for entry into database.
if value is not None:
@@ -860,9 +867,7 @@ class BoundFieldLine(object):
for bound_field in self.bound_fields:
yield bound_field
- def __repr__(self):
- return "%s:(%s)" % (self.__class__.__name__, self.bound_fields)
-
+
def __len__(self):
return len(self.bound_fields)
@@ -881,7 +886,7 @@ class FieldLine(object):
yield field
def __len__(self):
- return len(self.fields)
+ return len(self.fields)
class BoundFieldSet(object):
def __init__(self, field_set, field_mapping, original, bound_field_line_class=BoundFieldLine):
@@ -889,9 +894,7 @@ class BoundFieldSet(object):
self.classes = field_set.classes
self.bound_field_lines = [ field_line.bind(field_mapping,original, bound_field_line_class)
for field_line in field_set]
- def __repr__(self):
- return "%s:(%s,%s)" % (self.__class__.__name__, self.name, self.bound_field_lines)
-
+
def __iter__(self):
for bound_field_line in self.bound_field_lines:
yield bound_field_line
diff --git a/django/core/template/__init__.py b/django/core/template/__init__.py
index e2bf98dd8b..e7ce2de8ba 100644
--- a/django/core/template/__init__.py
+++ b/django/core/template/__init__.py
@@ -826,7 +826,6 @@ class DebugNodeList(NodeList):
e.source = node.source
raise
except Exception, e:
-
from traceback import extract_tb, format_list, format_exception_only
from sys import exc_info
t,v,tb = exc_info()