Created
October 5, 2015 16:25
-
-
Save evz/21d828a08f5559d06360 to your computer and use it in GitHub Desktop.
For Mark
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Environment: | |
Request Method: GET | |
Request URL: http://127.0.0.1:8001/election/council-member-2015/post/ocd-division,country:us,state:mn,place:st_paul,ward:1/council-member-for-ward-1 | |
Django Version: 1.8.3 | |
Python Version: 2.7.9 | |
Installed Applications: | |
('django.contrib.admin', | |
'django.contrib.auth', | |
'django.contrib.contenttypes', | |
'django.contrib.humanize', | |
'django.contrib.sessions', | |
'django.contrib.messages', | |
'django.contrib.staticfiles', | |
'django.contrib.sites', | |
'django_nose', | |
'pipeline', | |
'statici18n', | |
'elections.st_paul_municipal_2015', | |
'candidates', | |
'tasks', | |
'cached_counts', | |
'moderation_queue', | |
'auth_helpers', | |
'debug_toolbar', | |
'template_timings_panel', | |
'official_documents', | |
'results', | |
'allauth', | |
'allauth.account', | |
'allauth.socialaccount', | |
'allauth.socialaccount.providers.google', | |
'allauth.socialaccount.providers.facebook', | |
'allauth.socialaccount.providers.twitter') | |
Installed Middleware: | |
('debug_toolbar.middleware.DebugToolbarMiddleware', | |
'candidates.middleware.PopItDownMiddleware', | |
'django.contrib.sessions.middleware.SessionMiddleware', | |
'django.middleware.locale.LocaleMiddleware', | |
'django.middleware.common.CommonMiddleware', | |
'django.middleware.csrf.CsrfViewMiddleware', | |
'django.contrib.auth.middleware.AuthenticationMiddleware', | |
'candidates.middleware.CopyrightAssignmentMiddleware', | |
'candidates.middleware.DisallowedUpdateMiddleware', | |
'django.contrib.messages.middleware.MessageMiddleware', | |
'django.middleware.clickjacking.XFrameOptionsMiddleware') | |
Template error: | |
In template /home/eric/code/yournextrepresentative/elections/st_paul_municipal_2015/templates/candidates/_candidates_for_post.html, error at line 100 | |
'str' object has no attribute 'get_elected' | |
90 : <a href="{% url 'constituency' election=election post_id=post_data.id ignored_slug=post_data.label|slugify %}"> | |
91 : {{ post_data.label }} | |
92 : </a> | |
93 : </h3> | |
94 : | |
95 : {% for c in candidates %} | |
96 : {% if forloop.first %} | |
97 : <ul class="candidate-list"> | |
98 : {% endif %} | |
99 : | |
100 : <li class="candidates-list__person{% if user_can_record_results %} hover-highlighting{% endif %} {% if c|was_elected:election %} candidates-list__person__winner{% endif %}"> | |
101 : {% if c|was_elected:election %} | |
102 : <h4 class="candidates-list__person__elected-text">{% trans "Winner" %}</h4> | |
103 : {% endif %} | |
104 : | |
105 : {% include 'candidates/_person_in_list.html' with election=election %} | |
106 : {% if user.is_authenticated %} | |
107 : <p> | |
108 : {% if candidate_list_edits_allowed %} | |
109 : <a class="button tiny js-toggle-source-confirmation not-standing">{% trans "Not actually standing?" %}</a> | |
110 : {% endif %} | |
Traceback: | |
File "/home/eric/.virtualenvs/ynr/local/lib/python2.7/site-packages/django/core/handlers/base.py" in get_response | |
164. response = response.render() | |
File "/home/eric/.virtualenvs/ynr/local/lib/python2.7/site-packages/django/template/response.py" in render | |
158. self.content = self.rendered_content | |
File "/home/eric/.virtualenvs/ynr/local/lib/python2.7/site-packages/django/template/response.py" in rendered_content | |
135. content = template.render(context, self._request) | |
File "/home/eric/.virtualenvs/ynr/local/lib/python2.7/site-packages/django/template/backends/django.py" in render | |
74. return self.template.render(context) | |
File "/home/eric/.virtualenvs/ynr/local/lib/python2.7/site-packages/template_timings_panel/panels/TemplateTimings.py" in timing_hook | |
137. result = func(self, *args, **kwargs) | |
File "/home/eric/.virtualenvs/ynr/local/lib/python2.7/site-packages/django/template/base.py" in render | |
209. return self._render(context) | |
File "/home/eric/.virtualenvs/ynr/local/lib/python2.7/site-packages/django/test/utils.py" in instrumented_test_render | |
96. return self.nodelist.render(context) | |
File "/home/eric/.virtualenvs/ynr/local/lib/python2.7/site-packages/django/template/base.py" in render | |
903. bit = self.render_node(node, context) | |
File "/home/eric/.virtualenvs/ynr/local/lib/python2.7/site-packages/django/template/debug.py" in render_node | |
79. return node.render(context) | |
File "/home/eric/.virtualenvs/ynr/local/lib/python2.7/site-packages/django/template/loader_tags.py" in render | |
135. return compiled_parent._render(context) | |
File "/home/eric/.virtualenvs/ynr/local/lib/python2.7/site-packages/django/test/utils.py" in instrumented_test_render | |
96. return self.nodelist.render(context) | |
File "/home/eric/.virtualenvs/ynr/local/lib/python2.7/site-packages/django/template/base.py" in render | |
903. bit = self.render_node(node, context) | |
File "/home/eric/.virtualenvs/ynr/local/lib/python2.7/site-packages/django/template/debug.py" in render_node | |
79. return node.render(context) | |
File "/home/eric/.virtualenvs/ynr/local/lib/python2.7/site-packages/django/template/loader_tags.py" in render | |
135. return compiled_parent._render(context) | |
File "/home/eric/.virtualenvs/ynr/local/lib/python2.7/site-packages/django/test/utils.py" in instrumented_test_render | |
96. return self.nodelist.render(context) | |
File "/home/eric/.virtualenvs/ynr/local/lib/python2.7/site-packages/django/template/base.py" in render | |
903. bit = self.render_node(node, context) | |
File "/home/eric/.virtualenvs/ynr/local/lib/python2.7/site-packages/django/template/debug.py" in render_node | |
79. return node.render(context) | |
File "/home/eric/.virtualenvs/ynr/local/lib/python2.7/site-packages/template_timings_panel/panels/TemplateTimings.py" in timing_hook | |
137. result = func(self, *args, **kwargs) | |
File "/home/eric/.virtualenvs/ynr/local/lib/python2.7/site-packages/django/template/loader_tags.py" in render | |
65. result = block.nodelist.render(context) | |
File "/home/eric/.virtualenvs/ynr/local/lib/python2.7/site-packages/django/template/base.py" in render | |
903. bit = self.render_node(node, context) | |
File "/home/eric/.virtualenvs/ynr/local/lib/python2.7/site-packages/django/template/debug.py" in render_node | |
79. return node.render(context) | |
File "/home/eric/.virtualenvs/ynr/local/lib/python2.7/site-packages/django/template/loader_tags.py" in render | |
159. return template.render(context) | |
File "/home/eric/.virtualenvs/ynr/local/lib/python2.7/site-packages/template_timings_panel/panels/TemplateTimings.py" in timing_hook | |
137. result = func(self, *args, **kwargs) | |
File "/home/eric/.virtualenvs/ynr/local/lib/python2.7/site-packages/django/template/base.py" in render | |
211. return self._render(context) | |
File "/home/eric/.virtualenvs/ynr/local/lib/python2.7/site-packages/django/test/utils.py" in instrumented_test_render | |
96. return self.nodelist.render(context) | |
File "/home/eric/.virtualenvs/ynr/local/lib/python2.7/site-packages/django/template/base.py" in render | |
903. bit = self.render_node(node, context) | |
File "/home/eric/.virtualenvs/ynr/local/lib/python2.7/site-packages/django/template/debug.py" in render_node | |
79. return node.render(context) | |
File "/home/eric/.virtualenvs/ynr/local/lib/python2.7/site-packages/django/template/defaulttags.py" in render | |
217. nodelist.append(node.render(context)) | |
File "/home/eric/.virtualenvs/ynr/local/lib/python2.7/site-packages/django/template/defaulttags.py" in render | |
322. match = condition.eval(context) | |
File "/home/eric/.virtualenvs/ynr/local/lib/python2.7/site-packages/django/template/defaulttags.py" in eval | |
937. return self.value.resolve(context, ignore_failures=True) | |
File "/home/eric/.virtualenvs/ynr/local/lib/python2.7/site-packages/django/template/base.py" in resolve | |
674. new_obj = func(obj, *arg_vals) | |
File "/home/eric/code/yournextrepresentative/candidates/templatetags/standing.py" in was_elected | |
51. return bool(person.get_elected(election)) | |
Exception Type: AttributeError at /election/council-member-2015/post/ocd-division,country:us,state:mn,place:st_paul,ward:1/council-member-for-ward-1 | |
Exception Value: 'str' object has no attribute 'get_elected' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment