To be complete, this is the Error page I get: TypeError at /admin/reg/languages/2/ 'bool' object is not callable Request Method: GET Request URL: http://localhost:8000/admin/reg/languages/2/ Exception Type: TypeError Exception Value: 'bool' object is not callable Exception Location: /usr/lib/python2.4/site-packages/django/core/meta/__init__.py in bind, line 262
Template error In template /usr/lib/python2.4/site-packages/django/contrib/admin/templates/admin/change_form.html, error at line 52 Caught an exception while rendering. 42 {% block after_field_sets %}{% endblock %} 43 {% if change %} 44 {% if bound_manipulator.ordered_objects %} 45 <fieldset class="module"><h2>{% trans "Ordering" %}</h2> 46 <div class="form-row{% if form.order_.errors %} error{% endif %} "> 47 {% if form.order_.errors %}{{ form.order_.html_error_list }}{% endif %} 48 <p><label for="id_order_">{% trans "Order:" %}</label> {{ form.order_ }}</p> 49 </div></fieldset> 50 {% endif %} 51 {% endif %} 52 {% for related_object in bound_manipulator.inline_related_objects %}{% edit_inline related_object %}{% endfor %} 53 {% block after_related_objects %}{% endblock %} 54 {% submit_row bound_manipulator %} 55 {% if add %} 56 <script type="text/javascript">document.getElementById("{{ bound_manipulator.first_form_field_id }}").focus();</script> 57 {% endif %} 58 {% if bound_manipulator.auto_populated_fields %} 59 <script type="text/javascript"> 60 {% auto_populated_field_script bound_manipulator.auto_populated_fields change %} 61 </script> 62 {% endif %} Traceback (innermost last) * /usr/lib/python2.4/site-packages/django/core/template/__init__.py in render_node 724. 725. def render_node(self, node, context): 726. return(node.render(context)) 727. 728. class DebugNodeList(NodeList): 729. def render_node(self, node, context): 730. try: 731. result = node.render(context) ... 732. except TemplateSyntaxError, e: 733. if not hasattr(e, 'source'): 734. e.source = node.source 735. raise 736. except Exception: 737. from sys import exc_info ▶ Local vars Variable Value context [{}, {'forloop': {'parentloop': {}, 'last': True, 'counter': 2, 'revcounter0': 0, 'revcounter': 1, 'counter0': 1, 'first': False}, 'related_object': <RelatedObject: languagetranslations related to translation_language>}, {'block': <Block Node: content. Contents: [<Text Node: '<div id="content-main"> '>, <If node>, <Text Node: ' <form '>, <Variable Node: bound_manipulator.form_enc_attrib>, <Text Node: ' action="'>, <Variable Node: form_url>, <Text Node: '" method="post">'>, <Block Node: form_top. Contents: []>, <Text Node: ' '>, <If node>, <Text Node: ' '>, <If node>, <Text Node: ' '>, <If node>, <Text Node: ' '>, <For Node: for bound_field_set in bound_manipulator.bound_field_sets, tail_len: 7>, <Text Node: ' '>, <Block Node: after_field_sets. Contents: []>, <Text Node: ' '>, <If node>, <Text Node: ' '>, <For Node: for related_object in bound_manipulator.inline_related_objects, tail_len: 1>, <Text Node: ' '>, <Block Node: after_related_objects. Contents: []>, <Text Node: ' '>, <django.core.template.InclusionNode instance at 0xb6d2790c>, <Text Node: ' '>, <If node>, <Text Node: ' '>, <If node>, <Text Node: ' '>, <If node>, <Text Node: ' </form></div> '>]>}, {}, {'has_delete_permission': True, 'bound_manipulator': <django.contrib.admin.views.main.AdminBoundManipulator object at 0xb6d27acc>, 'add': False, 'app_label': 'reg', 'form_url': '', 'change': True}, {'LANGUAGES': (('bn', 'Bengali'), ('cs', 'Czech'), ('cy', 'Welsh'), ('da', 'Danish'), ('de', 'German'), ('en', 'English'), ('es', 'Spanish'), ('fr', 'French'), ('gl', 'Galician'), ('is', 'Icelandic'), ('it', 'Italian'), ('ja', 'Japanese'), ('nl', 'Dutch'), ('no', 'Norwegian'), ('pt-br', 'Brazilian'), ('ro', 'Romanian'), ('ru', 'Russian'), ('sk', 'Slovak'), ('sr', 'Serbian'), ('sv', 'Swedish'), ('zh-cn', 'Simplified Chinese'), ('zh-tw', 'Traditional Chinese')), 'LANGUAGE_CODE': 'en-us'}, {}, {'perms': <django.core.context_processors.PermWrapper instance at 0xb6d27c0c>, 'messages': [], 'user': rfroger}, {'is_popup': False, 'original': English, 'object_id': '2', 'form': {'error_dict': {}, 'edit_inline': True, '_inline_collections': [<django.core.formfields.InlineObjectCollection instance at 0xb6d952ac>, <django.core.formfields.InlineObjectCollection instance at 0xb6d9588c>], 'manipulator': <django.models.languages.LanguageManipulatorChange instance at 0xb6d6a5ac>, 'order_objects': [], 'data': {'abbreviation': 'en', 'name': 'English', 'languagetranslation.0.id': None, 'languagetranslation.0.translation': '', 'languagetranslation.0.translation_language_id': None, 'id': 2}, 'original': English}, 'title': 'Change language'}] exc_info <built-in function exc_info> node <For Node: for related_object in bound_manipulator.inline_related_objects, tail_len: 1> self [<Text Node: '<div id="content-main"> '>, <If node>, <Text Node: ' <form '>, <Variable Node: bound_manipulator.form_enc_attrib>, <Text Node: ' action="'>, <Variable Node: form_url>, <Text Node: '" method="post">'>, <Block Node: form_top. Contents: []>, <Text Node: ' '>, <If node>, <Text Node: ' '>, <If node>, <Text Node: ' '>, <If node>, <Text Node: ' '>, <For Node: for bound_field_set in bound_manipulator.bound_field_sets, tail_len: 7>, <Text Node: ' '>, <Block Node: after_field_sets. Contents: []>, <Text Node: ' '>, <If node>, <Text Node: ' '>, <For Node: for related_object in bound_manipulator.inline_related_objects, tail_len: 1>, <Text Node: ' '>, <Block Node: after_related_objects. Contents: []>, <Text Node: ' '>, <django.core.template.InclusionNode instance at 0xb6d2790c>, <Text Node: ' '>, <If node>, <Text Node: ' '>, <If node>, <Text Node: ' '>, <If node>, <Text Node: ' </form></div> '>] wrapped <django.core.template.TemplateSyntaxError instance at 0xb6d95fcc> * /usr/lib/python2.4/site-packages/django/core/template/defaulttags.py in render 104. # boolean values designating first and last times through loop 105. 'first': (i == 0), 106. 'last': (i == len_values - 1), 107. 'parentloop': parentloop, 108. } 109. context[self.loopvar] = item 110. for node in self.nodelist_loop: 111. nodelist.append(node.render(context)) ... 112. context.pop() 113. return nodelist.render(context) 114. 115. class IfChangedNode(Node): 116. def __init__(self, nodelist): 117. self.nodelist = nodelist ▶ Local vars Variable Value context [{}, {'forloop': {'parentloop': {}, 'last': True, 'counter': 2, 'revcounter0': 0, 'revcounter': 1, 'counter0': 1, 'first': False}, 'related_object': <RelatedObject: languagetranslations related to translation_language>}, {'block': <Block Node: content. Contents: [<Text Node: '<div id="content-main"> '>, <If node>, <Text Node: ' <form '>, <Variable Node: bound_manipulator.form_enc_attrib>, <Text Node: ' action="'>, <Variable Node: form_url>, <Text Node: '" method="post">'>, <Block Node: form_top. Contents: []>, <Text Node: ' '>, <If node>, <Text Node: ' '>, <If node>, <Text Node: ' '>, <If node>, <Text Node: ' '>, <For Node: for bound_field_set in bound_manipulator.bound_field_sets, tail_len: 7>, <Text Node: ' '>, <Block Node: after_field_sets. Contents: []>, <Text Node: ' '>, <If node>, <Text Node: ' '>, <For Node: for related_object in bound_manipulator.inline_related_objects, tail_len: 1>, <Text Node: ' '>, <Block Node: after_related_objects. Contents: []>, <Text Node: ' '>, <django.core.template.InclusionNode instance at 0xb6d2790c>, <Text Node: ' '>, <If node>, <Text Node: ' '>, <If node>, <Text Node: ' '>, <If node>, <Text Node: ' </form></div> '>]>}, {}, {'has_delete_permission': True, 'bound_manipulator': <django.contrib.admin.views.main.AdminBoundManipulator object at 0xb6d27acc>, 'add': False, 'app_label': 'reg', 'form_url': '', 'change': True}, {'LANGUAGES': (('bn', 'Bengali'), ('cs', 'Czech'), ('cy', 'Welsh'), ('da', 'Danish'), ('de', 'German'), ('en', 'English'), ('es', 'Spanish'), ('fr', 'French'), ('gl', 'Galician'), ('is', 'Icelandic'), ('it', 'Italian'), ('ja', 'Japanese'), ('nl', 'Dutch'), ('no', 'Norwegian'), ('pt-br', 'Brazilian'), ('ro', 'Romanian'), ('ru', 'Russian'), ('sk', 'Slovak'), ('sr', 'Serbian'), ('sv', 'Swedish'), ('zh-cn', 'Simplified Chinese'), ('zh-tw', 'Traditional Chinese')), 'LANGUAGE_CODE': 'en-us'}, {}, {'perms': <django.core.context_processors.PermWrapper instance at 0xb6d27c0c>, 'messages': [], 'user': rfroger}, {'is_popup': False, 'original': English, 'object_id': '2', 'form': {'error_dict': {}, 'edit_inline': True, '_inline_collections': [<django.core.formfields.InlineObjectCollection instance at 0xb6d952ac>, <django.core.formfields.InlineObjectCollection instance at 0xb6d9588c>], 'manipulator': <django.models.languages.LanguageManipulatorChange instance at 0xb6d6a5ac>, 'order_objects': [], 'data': {'abbreviation': 'en', 'name': 'English', 'languagetranslation.0.id': None, 'languagetranslation.0.translation': '', 'languagetranslation.0.translation_language_id': None, 'id': 2}, 'original': English}, 'title': 'Change language'}] i 1 item <RelatedObject: languagetranslations related to translation_language> len_values 2 node <django.templatetags.admin_modify.EditInlineNode instance at 0xb6d9748c> nodelist ['\n<fieldset class="module">\n <h2>Language translations</h2><table>\n <thead><tr>\n \n \n \n \n <th>Translated name of the language</th>\n \n \n \n <th>Language of the translation</th>\n \n \n \n \n \n <tr class="row1">\n \n \n \n \n <td >\n <input type="text" id="id_languagetranslation.0.translation" >class="vTextField" name="languagetranslation.0.translation" size="30" value="" >maxlength="200" />\n\n </td>\n \n \n \n <td >\n \n<select >id="id_languagetranslation.0.translation_language" class="vSelectField" >name="languagetranslation.0.translation_language" size="1">\n <option value="" >selected="selected">---------</option>\n <option value="1">Dutch</option>\n ><option value="2">English</option>\n </select>\n\n\n <a >href="../../../reg/languages/add/" class="add-another" >id="add_id_languagetranslation.0.translation_language" onclick="return >showAddAnotherPopup(this);"> <img src="/media/img/admin/icon_addlink.gif" >width="10" height="10" alt="Add Another"/></a>\n\n\n </td>\n \n \n \n ></tr>\n\n </table>\n\n \n \n \n <input type="hidden" >id="id_languagetranslation.0.id" name="languagetranslation.0.id" value="" >/>\n\n \n \n \n \n \n \n \n</fieldset>\n'] parentloop {} self <For Node: for related_object in bound_manipulator.inline_related_objects, tail_len: 1> values [<RelatedObject: languagetranslations related to language>, <RelatedObject: languagetranslations related to translation_language>] * /usr/lib/python2.4/site-packages/django/contrib/admin/templatetags/admin_modify.py in render 153. context.push() 154. 155. klass = relation.field.rel.edit_inline 156. bound_related_object_class = bound_related_object_overrides.get(klass, klass) 157. 158. original = context.get('original', None) 159. 160. bound_related_object = relation.bind(context['form'], original, bound_related_object_class) ... 161. context['bound_related_object'] = bound_related_object 162. 163. t = template_loader.get_template(bound_related_object.template_name()) 164. 165. output = t.render(context) 166. ▶ Local vars Variable Value bound_related_object_class False context [{}, {'forloop': {'parentloop': {}, 'last': True, 'counter': 2, 'revcounter0': 0, 'revcounter': 1, 'counter0': 1, 'first': False}, 'related_object': <RelatedObject: languagetranslations related to translation_language>}, {'block': <Block Node: content. Contents: [<Text Node: '<div id="content-main"> '>, <If node>, <Text Node: ' <form '>, <Variable Node: bound_manipulator.form_enc_attrib>, <Text Node: ' action="'>, <Variable Node: form_url>, <Text Node: '" method="post">'>, <Block Node: form_top. Contents: []>, <Text Node: ' '>, <If node>, <Text Node: ' '>, <If node>, <Text Node: ' '>, <If node>, <Text Node: ' '>, <For Node: for bound_field_set in bound_manipulator.bound_field_sets, tail_len: 7>, <Text Node: ' '>, <Block Node: after_field_sets. Contents: []>, <Text Node: ' '>, <If node>, <Text Node: ' '>, <For Node: for related_object in bound_manipulator.inline_related_objects, tail_len: 1>, <Text Node: ' '>, <Block Node: after_related_objects. Contents: []>, <Text Node: ' '>, <django.core.template.InclusionNode instance at 0xb6d2790c>, <Text Node: ' '>, <If node>, <Text Node: ' '>, <If node>, <Text Node: ' '>, <If node>, <Text Node: ' </form></div> '>]>}, {}, {'has_delete_permission': True, 'bound_manipulator': <django.contrib.admin.views.main.AdminBoundManipulator object at 0xb6d27acc>, 'add': False, 'app_label': 'reg', 'form_url': '', 'change': True}, {'LANGUAGES': (('bn', 'Bengali'), ('cs', 'Czech'), ('cy', 'Welsh'), ('da', 'Danish'), ('de', 'German'), ('en', 'English'), ('es', 'Spanish'), ('fr', 'French'), ('gl', 'Galician'), ('is', 'Icelandic'), ('it', 'Italian'), ('ja', 'Japanese'), ('nl', 'Dutch'), ('no', 'Norwegian'), ('pt-br', 'Brazilian'), ('ro', 'Romanian'), ('ru', 'Russian'), ('sk', 'Slovak'), ('sr', 'Serbian'), ('sv', 'Swedish'), ('zh-cn', 'Simplified Chinese'), ('zh-tw', 'Traditional Chinese')), 'LANGUAGE_CODE': 'en-us'}, {}, {'perms': <django.core.context_processors.PermWrapper instance at 0xb6d27c0c>, 'messages': [], 'user': rfroger}, {'is_popup': False, 'original': English, 'object_id': '2', 'form': {'error_dict': {}, 'edit_inline': True, '_inline_collections': [<django.core.formfields.InlineObjectCollection instance at 0xb6d952ac>, <django.core.formfields.InlineObjectCollection instance at 0xb6d9588c>], 'manipulator': <django.models.languages.LanguageManipulatorChange instance at 0xb6d6a5ac>, 'order_objects': [], 'data': {'abbreviation': 'en', 'name': 'English', 'languagetranslation.0.id': None, 'languagetranslation.0.translation': '', 'languagetranslation.0.translation_language_id': None, 'id': 2}, 'original': English}, 'title': 'Change language'}] klass False original English relation <RelatedObject: languagetranslations related to translation_language> self <django.templatetags.admin_modify.EditInlineNode instance at 0xb6d9748c> * /usr/lib/python2.4/site-packages/django/core/meta/__init__.py in bind 255. for f in self.opts.fields + self.opts.many_to_many: 256. if follow.get(f.name, False): 257. prefix = '%s.%d.' % (self.var_name, i) 258. fields.extend(f.get_manipulator_fields(self.opts, manipulator, change, name_prefix=prefix, rel=True)) 259. return fields 260. 261. def bind(self, field_mapping, original, bound_related_object_class=BoundRelatedObject): 262. return bound_related_object_class(self, field_mapping, original) ... 263. 264. def get_method_name_part(self): 265. # This method encapsulates the logic that decides what name to give a 266. # method that retrieves related many-to-one or many-to-many objects. 267. # Usually it just uses the lower-cased object_name, but if the related 268. # object is in another app, the related object's app_label is appended. Local vars