Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [ERROR] [2020-01-14 03:25:38,150] : Internal Server Error: /admin-panel/app/shop/72/change/
- Traceback (most recent call last):
- File "/root/django/myvenv/lib/python3.7/site-packages/django/db/models/fields/related_descriptors.py", line 164, in __get__
- rel_obj = self.field.get_cached_value(instance)
- File "/root/django/myvenv/lib/python3.7/site-packages/django/db/models/fields/mixins.py", line 13, in get_cached_value
- return instance._state.fields_cache[cache_name]
- KeyError: 'user'
- During handling of the above exception, another exception occurred:
- Traceback (most recent call last):
- File "/root/django/myvenv/lib/python3.7/site-packages/django/core/handlers/exception.py", line 34, in inner
- response = get_response(request)
- File "/root/django/myvenv/lib/python3.7/site-packages/django/core/handlers/base.py", line 145, in _get_response
- response = self.process_exception_by_middleware(e, request)
- File "/root/django/myvenv/lib/python3.7/site-packages/django/core/handlers/base.py", line 155, in process_exception_by_middleware
- response = middleware_method(request, exception)
- File "/root/django/app/middleware.py", line 123, in process_exception
- raise exception
- File "/root/django/myvenv/lib/python3.7/site-packages/django/core/handlers/base.py", line 143, in _get_response
- response = response.render()
- File "/root/django/myvenv/lib/python3.7/site-packages/django/template/response.py", line 106, in render
- self.content = self.rendered_content
- File "/root/django/myvenv/lib/python3.7/site-packages/django/template/response.py", line 83, in rendered_content
- content = template.render(context, self._request)
- File "/root/django/myvenv/lib/python3.7/site-packages/django/template/backends/django.py", line 61, in render
- return self.template.render(context)
- File "/root/django/myvenv/lib/python3.7/site-packages/django/template/base.py", line 171, in render
- return self._render(context)
- File "/root/django/myvenv/lib/python3.7/site-packages/django/template/base.py", line 163, in _render
- return self.nodelist.render(context)
- File "/root/django/myvenv/lib/python3.7/site-packages/django/template/base.py", line 937, in render
- bit = node.render_annotated(context)
- File "/root/django/myvenv/lib/python3.7/site-packages/django/template/base.py", line 904, in render_annotated
- return self.render(context)
- File "/root/django/myvenv/lib/python3.7/site-packages/django/template/loader_tags.py", line 150, in render
- return compiled_parent._render(context)
- File "/root/django/myvenv/lib/python3.7/site-packages/django/template/base.py", line 163, in _render
- return self.nodelist.render(context)
- File "/root/django/myvenv/lib/python3.7/site-packages/django/template/base.py", line 937, in render
- bit = node.render_annotated(context)
- File "/root/django/myvenv/lib/python3.7/site-packages/django/template/base.py", line 904, in render_annotated
- return self.render(context)
- File "/root/django/myvenv/lib/python3.7/site-packages/django/template/loader_tags.py", line 150, in render
- return compiled_parent._render(context)
- File "/root/django/myvenv/lib/python3.7/site-packages/django/template/base.py", line 163, in _render
- return self.nodelist.render(context)
- File "/root/django/myvenv/lib/python3.7/site-packages/django/template/base.py", line 937, in render
- bit = node.render_annotated(context)
- File "/root/django/myvenv/lib/python3.7/site-packages/django/template/base.py", line 904, in render_annotated
- return self.render(context)
- File "/root/django/myvenv/lib/python3.7/site-packages/django/template/loader_tags.py", line 62, in render
- result = block.nodelist.render(context)
- File "/root/django/myvenv/lib/python3.7/site-packages/django/template/base.py", line 937, in render
- bit = node.render_annotated(context)
- File "/root/django/myvenv/lib/python3.7/site-packages/django/template/base.py", line 904, in render_annotated
- return self.render(context)
- File "/root/django/myvenv/lib/python3.7/site-packages/django/template/loader_tags.py", line 62, in render
- result = block.nodelist.render(context)
- File "/root/django/myvenv/lib/python3.7/site-packages/django/template/base.py", line 937, in render
- bit = node.render_annotated(context)
- File "/root/django/myvenv/lib/python3.7/site-packages/django/template/base.py", line 904, in render_annotated
- return self.render(context)
- File "/root/django/myvenv/lib/python3.7/site-packages/django/template/defaulttags.py", line 209, in render
- nodelist.append(node.render_annotated(context))
- File "/root/django/myvenv/lib/python3.7/site-packages/django/template/base.py", line 904, in render_annotated
- return self.render(context)
- File "/root/django/myvenv/lib/python3.7/site-packages/django/template/loader_tags.py", line 188, in render
- return template.render(context)
- File "/root/django/myvenv/lib/python3.7/site-packages/django/template/base.py", line 173, in render
- return self._render(context)
- File "/root/django/myvenv/lib/python3.7/site-packages/django/template/base.py", line 163, in _render
- return self.nodelist.render(context)
- File "/root/django/myvenv/lib/python3.7/site-packages/django/template/base.py", line 937, in render
- bit = node.render_annotated(context)
- File "/root/django/myvenv/lib/python3.7/site-packages/django/template/base.py", line 904, in render_annotated
- return self.render(context)
- File "/root/django/myvenv/lib/python3.7/site-packages/django/template/defaulttags.py", line 209, in render
- nodelist.append(node.render_annotated(context))
- File "/root/django/myvenv/lib/python3.7/site-packages/django/template/base.py", line 904, in render_annotated
- return self.render(context)
- File "/root/django/myvenv/lib/python3.7/site-packages/django/template/defaulttags.py", line 209, in render
- nodelist.append(node.render_annotated(context))
- File "/root/django/myvenv/lib/python3.7/site-packages/django/template/base.py", line 904, in render_annotated
- return self.render(context)
- File "/root/django/myvenv/lib/python3.7/site-packages/django/template/defaulttags.py", line 309, in render
- return nodelist.render(context)
- File "/root/django/myvenv/lib/python3.7/site-packages/django/template/base.py", line 937, in render
- bit = node.render_annotated(context)
- File "/root/django/myvenv/lib/python3.7/site-packages/django/template/base.py", line 904, in render_annotated
- return self.render(context)
- File "/root/django/myvenv/lib/python3.7/site-packages/django/template/defaulttags.py", line 309, in render
- return nodelist.render(context)
- File "/root/django/myvenv/lib/python3.7/site-packages/django/template/base.py", line 937, in render
- bit = node.render_annotated(context)
- File "/root/django/myvenv/lib/python3.7/site-packages/django/template/base.py", line 904, in render_annotated
- return self.render(context)
- File "/root/django/myvenv/lib/python3.7/site-packages/django/template/base.py", line 993, in render
- return render_value_in_context(output, context)
- File "/root/django/myvenv/lib/python3.7/site-packages/django/template/base.py", line 972, in render_value_in_context
- value = str(value)
- File "/root/django/myvenv/lib/python3.7/site-packages/django/utils/html.py", line 388, in <lambda>
- klass.__str__ = lambda self: mark_safe(klass_str(self))
- File "/root/django/myvenv/lib/python3.7/site-packages/django/forms/boundfield.py", line 33, in __str__
- return self.as_widget()
- File "/root/django/myvenv/lib/python3.7/site-packages/django/forms/boundfield.py", line 93, in as_widget
- renderer=self.form.renderer,
- File "/root/django/myvenv/lib/python3.7/site-packages/django/forms/widgets.py", line 241, in render
- context = self.get_context(name, value, attrs)
- File "/root/django/myvenv/lib/python3.7/site-packages/django/contrib/admin/widgets.py", line 288, in get_context
- 'rendered_widget': self.widget.render(name, value, attrs),
- File "/root/django/myvenv/lib/python3.7/site-packages/django/forms/widgets.py", line 241, in render
- context = self.get_context(name, value, attrs)
- File "/root/django/myvenv/lib/python3.7/site-packages/django/forms/widgets.py", line 680, in get_context
- context = super().get_context(name, value, attrs)
- File "/root/django/myvenv/lib/python3.7/site-packages/django/forms/widgets.py", line 641, in get_context
- context['widget']['optgroups'] = self.optgroups(name, context['widget']['value'], attrs)
- File "/root/django/myvenv/lib/python3.7/site-packages/django/forms/widgets.py", line 589, in optgroups
- for index, (option_value, option_label) in enumerate(self.choices):
- File "/root/django/myvenv/lib/python3.7/site-packages/django/forms/models.py", line 1138, in __iter__
- yield self.choice(obj)
- File "/root/django/myvenv/lib/python3.7/site-packages/django/forms/models.py", line 1150, in choice
- return (self.field.prepare_value(obj), self.field.label_from_instance(obj))
- File "/root/django/myvenv/lib/python3.7/site-packages/django/forms/models.py", line 1216, in label_from_instance
- return str(obj)
- File "/root/django/app/models.py", line 52, in __str__
- return f'{self.user.first_name} {self.user.last_name}'
- File "/root/django/myvenv/lib/python3.7/site-packages/django/db/models/fields/related_descriptors.py", line 178, in __get__
- rel_obj = self.get_object(instance)
- File "/root/django/myvenv/lib/python3.7/site-packages/django/db/models/fields/related_descriptors.py", line 298, in get_object
- return super().get_object(instance)
- File "/root/django/myvenv/lib/python3.7/site-packages/django/db/models/fields/related_descriptors.py", line 145, in get_object
- return qs.get(self.field.get_reverse_related_filter(instance))
- File "/root/django/myvenv/lib/python3.7/site-packages/django/db/models/query.py", line 408, in get
- self.model._meta.object_name
- django.contrib.auth.models.User.DoesNotExist: User matching query does not exist.
Advertisement
Add Comment
Please, Sign In to add comment