Created
July 22, 2014 14:12
-
-
Save mlakkadshaw/6da6bb106d71e41821a6 to your computer and use it in GitHub Desktop.
This file contains hidden or 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://localhost:8000/me/ | |
Django Version: 1.7b4 | |
Python Version: 2.7.5 | |
Installed Applications: | |
('django.contrib.admin', | |
'django.contrib.sites', | |
'django.contrib.auth', | |
'django.contrib.contenttypes', | |
'django.contrib.sessions', | |
'django.contrib.messages', | |
'django.contrib.staticfiles', | |
'corsheaders', | |
'timezone_field', | |
'easy_thumbnails', | |
'image_cropping', | |
'pipeline', | |
'storages', | |
'allauth', | |
'allauth.account', | |
'allauth.socialaccount', | |
'allauth.socialaccount.providers.facebook', | |
'tokenapi', | |
'django_forms_bootstrap', | |
'payments', | |
'tutorme', | |
'tutorme.api') | |
Installed Middleware: | |
('django.middleware.gzip.GZipMiddleware', | |
'pipeline.middleware.MinifyHTMLMiddleware', | |
'django.contrib.sessions.middleware.SessionMiddleware', | |
'corsheaders.middleware.CorsMiddleware', | |
'django.middleware.common.CommonMiddleware', | |
'django.middleware.csrf.CsrfViewMiddleware', | |
'django.contrib.auth.middleware.AuthenticationMiddleware', | |
'django.contrib.auth.middleware.SessionAuthenticationMiddleware', | |
'django.contrib.messages.middleware.MessageMiddleware', | |
'django.middleware.clickjacking.XFrameOptionsMiddleware', | |
'dealer.contrib.django.staff.Middleware') | |
Template error: | |
In template /Users/mohammed/Code/Work/William/sync/templates/base.html, error at line 35 | |
The 'avatar' attribute has no file associated with it. | |
25 : </ul> | |
26 : {% load firstof from future %} | |
27 : {% if user.is_authenticated %} | |
28 : <ul class="me dropdown"> | |
29 : <li class="notification"><a id="messagesLabel" role="button" data-toggle="dropdown" data-target="#" href="/page.html">Notifications</a> | |
30 : <ul class="messages self-menu-dropdown dropdown-menu" role="menu" aria-labelledby="meLabel"> | |
31 : <li class="tiny-preview new-message"><a href="">Send a New Message</a></li> | |
32 : {% for m in unread_messages %} | |
33 : <li class="tiny-preview"> | |
34 : | |
35 : <p class="avatar" style="background-image: url(' {{ m.author.student.avatar.url }} ')">{{ m.author }}</p> | |
36 : <h4 class="name">{{ m.author }}</h4> | |
37 : <p class="preview">{{ m.text|truncatechars:20 }}</p> | |
38 : <p class="time">{{ m.created }}</p> | |
39 : </li> | |
40 : {% endfor %} | |
41 : <li class="tiny-preview all"> | |
42 : <a href="{% url 'messages-page' %}">SEE ALL</a> | |
43 : </li> | |
44 : </ul> | |
45 : </li> | |
Traceback: | |
File "/Users/mohammed/Code/Work/William/sync/venv/lib/python2.7/site-packages/django/core/handlers/base.py" in get_response | |
111. response = wrapped_callback(request, *callback_args, **callback_kwargs) | |
File "/Users/mohammed/Code/Work/William/sync/venv/lib/python2.7/site-packages/django/contrib/auth/decorators.py" in _wrapped_view | |
22. return view_func(request, *args, **kwargs) | |
File "/Users/mohammed/Code/Work/William/sync/tutorme/views.py" in profile | |
58. return render(request, "me.html", {'form': form, 'user_form': user_form, 'avatar_form': avatar_form, 'card': card, 'subscription_form': subscription_form, 'invoices': invoices, 'plan_choices': plans, 'current_plan': current_plan}) | |
File "/Users/mohammed/Code/Work/William/sync/venv/lib/python2.7/site-packages/django/shortcuts.py" in render | |
48. return HttpResponse(loader.render_to_string(*args, **kwargs), | |
File "/Users/mohammed/Code/Work/William/sync/venv/lib/python2.7/site-packages/django/template/loader.py" in render_to_string | |
178. return t.render(context_instance) | |
File "/Users/mohammed/Code/Work/William/sync/venv/lib/python2.7/site-packages/django/template/base.py" in render | |
148. return self._render(context) | |
File "/Users/mohammed/Code/Work/William/sync/venv/lib/python2.7/site-packages/django/template/base.py" in _render | |
142. return self.nodelist.render(context) | |
File "/Users/mohammed/Code/Work/William/sync/venv/lib/python2.7/site-packages/django/template/base.py" in render | |
844. bit = self.render_node(node, context) | |
File "/Users/mohammed/Code/Work/William/sync/venv/lib/python2.7/site-packages/django/template/debug.py" in render_node | |
80. return node.render(context) | |
File "/Users/mohammed/Code/Work/William/sync/venv/lib/python2.7/site-packages/django/template/loader_tags.py" in render | |
126. return compiled_parent._render(context) | |
File "/Users/mohammed/Code/Work/William/sync/venv/lib/python2.7/site-packages/django/template/base.py" in _render | |
142. return self.nodelist.render(context) | |
File "/Users/mohammed/Code/Work/William/sync/venv/lib/python2.7/site-packages/django/template/base.py" in render | |
844. bit = self.render_node(node, context) | |
File "/Users/mohammed/Code/Work/William/sync/venv/lib/python2.7/site-packages/django/template/debug.py" in render_node | |
80. return node.render(context) | |
File "/Users/mohammed/Code/Work/William/sync/venv/lib/python2.7/site-packages/django/template/loader_tags.py" in render | |
126. return compiled_parent._render(context) | |
File "/Users/mohammed/Code/Work/William/sync/venv/lib/python2.7/site-packages/django/template/base.py" in _render | |
142. return self.nodelist.render(context) | |
File "/Users/mohammed/Code/Work/William/sync/venv/lib/python2.7/site-packages/django/template/base.py" in render | |
844. bit = self.render_node(node, context) | |
File "/Users/mohammed/Code/Work/William/sync/venv/lib/python2.7/site-packages/django/template/debug.py" in render_node | |
80. return node.render(context) | |
File "/Users/mohammed/Code/Work/William/sync/venv/lib/python2.7/site-packages/django/template/defaulttags.py" in render | |
312. return nodelist.render(context) | |
File "/Users/mohammed/Code/Work/William/sync/venv/lib/python2.7/site-packages/django/template/base.py" in render | |
844. bit = self.render_node(node, context) | |
File "/Users/mohammed/Code/Work/William/sync/venv/lib/python2.7/site-packages/django/template/debug.py" in render_node | |
80. return node.render(context) | |
File "/Users/mohammed/Code/Work/William/sync/venv/lib/python2.7/site-packages/django/template/defaulttags.py" in render | |
201. nodelist.append(node.render(context)) | |
File "/Users/mohammed/Code/Work/William/sync/venv/lib/python2.7/site-packages/django/template/debug.py" in render | |
90. output = self.filter_expression.resolve(context) | |
File "/Users/mohammed/Code/Work/William/sync/venv/lib/python2.7/site-packages/django/template/base.py" in resolve | |
596. obj = self.var.resolve(context) | |
File "/Users/mohammed/Code/Work/William/sync/venv/lib/python2.7/site-packages/django/template/base.py" in resolve | |
734. value = self._resolve_lookup(context) | |
File "/Users/mohammed/Code/Work/William/sync/venv/lib/python2.7/site-packages/django/template/base.py" in _resolve_lookup | |
770. current = getattr(current, bit) | |
File "/Users/mohammed/Code/Work/William/sync/venv/lib/python2.7/site-packages/django/db/models/fields/files.py" in _get_url | |
66. self._require_file() | |
File "/Users/mohammed/Code/Work/William/sync/venv/lib/python2.7/site-packages/django/db/models/fields/files.py" in _require_file | |
44. raise ValueError("The '%s' attribute has no file associated with it." % self.field.name) | |
Exception Type: ValueError at /me/ | |
Exception Value: The 'avatar' attribute has no file associated with it. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment