Guest User

Untitled

a guest
Jan 13th, 2020
137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.88 KB | None | 0 0
  1. [ERROR] [2020-01-14 03:25:38,150] : Internal Server Error: /admin-panel/app/shop/72/change/
  2. Traceback (most recent call last):
  3. File "/root/django/myvenv/lib/python3.7/site-packages/django/db/models/fields/related_descriptors.py", line 164, in __get__
  4. rel_obj = self.field.get_cached_value(instance)
  5. File "/root/django/myvenv/lib/python3.7/site-packages/django/db/models/fields/mixins.py", line 13, in get_cached_value
  6. return instance._state.fields_cache[cache_name]
  7. KeyError: 'user'
  8.  
  9. During handling of the above exception, another exception occurred:
  10.  
  11. Traceback (most recent call last):
  12. File "/root/django/myvenv/lib/python3.7/site-packages/django/core/handlers/exception.py", line 34, in inner
  13. response = get_response(request)
  14. File "/root/django/myvenv/lib/python3.7/site-packages/django/core/handlers/base.py", line 145, in _get_response
  15. response = self.process_exception_by_middleware(e, request)
  16. File "/root/django/myvenv/lib/python3.7/site-packages/django/core/handlers/base.py", line 155, in process_exception_by_middleware
  17. response = middleware_method(request, exception)
  18. File "/root/django/app/middleware.py", line 123, in process_exception
  19. raise exception
  20. File "/root/django/myvenv/lib/python3.7/site-packages/django/core/handlers/base.py", line 143, in _get_response
  21. response = response.render()
  22. File "/root/django/myvenv/lib/python3.7/site-packages/django/template/response.py", line 106, in render
  23. self.content = self.rendered_content
  24. File "/root/django/myvenv/lib/python3.7/site-packages/django/template/response.py", line 83, in rendered_content
  25. content = template.render(context, self._request)
  26. File "/root/django/myvenv/lib/python3.7/site-packages/django/template/backends/django.py", line 61, in render
  27. return self.template.render(context)
  28. File "/root/django/myvenv/lib/python3.7/site-packages/django/template/base.py", line 171, in render
  29. return self._render(context)
  30. File "/root/django/myvenv/lib/python3.7/site-packages/django/template/base.py", line 163, in _render
  31. return self.nodelist.render(context)
  32. File "/root/django/myvenv/lib/python3.7/site-packages/django/template/base.py", line 937, in render
  33. bit = node.render_annotated(context)
  34. File "/root/django/myvenv/lib/python3.7/site-packages/django/template/base.py", line 904, in render_annotated
  35. return self.render(context)
  36. File "/root/django/myvenv/lib/python3.7/site-packages/django/template/loader_tags.py", line 150, in render
  37. return compiled_parent._render(context)
  38. File "/root/django/myvenv/lib/python3.7/site-packages/django/template/base.py", line 163, in _render
  39. return self.nodelist.render(context)
  40. File "/root/django/myvenv/lib/python3.7/site-packages/django/template/base.py", line 937, in render
  41. bit = node.render_annotated(context)
  42. File "/root/django/myvenv/lib/python3.7/site-packages/django/template/base.py", line 904, in render_annotated
  43. return self.render(context)
  44. File "/root/django/myvenv/lib/python3.7/site-packages/django/template/loader_tags.py", line 150, in render
  45. return compiled_parent._render(context)
  46. File "/root/django/myvenv/lib/python3.7/site-packages/django/template/base.py", line 163, in _render
  47. return self.nodelist.render(context)
  48. File "/root/django/myvenv/lib/python3.7/site-packages/django/template/base.py", line 937, in render
  49. bit = node.render_annotated(context)
  50. File "/root/django/myvenv/lib/python3.7/site-packages/django/template/base.py", line 904, in render_annotated
  51. return self.render(context)
  52. File "/root/django/myvenv/lib/python3.7/site-packages/django/template/loader_tags.py", line 62, in render
  53. result = block.nodelist.render(context)
  54. File "/root/django/myvenv/lib/python3.7/site-packages/django/template/base.py", line 937, in render
  55. bit = node.render_annotated(context)
  56. File "/root/django/myvenv/lib/python3.7/site-packages/django/template/base.py", line 904, in render_annotated
  57. return self.render(context)
  58. File "/root/django/myvenv/lib/python3.7/site-packages/django/template/loader_tags.py", line 62, in render
  59. result = block.nodelist.render(context)
  60. File "/root/django/myvenv/lib/python3.7/site-packages/django/template/base.py", line 937, in render
  61. bit = node.render_annotated(context)
  62. File "/root/django/myvenv/lib/python3.7/site-packages/django/template/base.py", line 904, in render_annotated
  63. return self.render(context)
  64. File "/root/django/myvenv/lib/python3.7/site-packages/django/template/defaulttags.py", line 209, in render
  65. nodelist.append(node.render_annotated(context))
  66. File "/root/django/myvenv/lib/python3.7/site-packages/django/template/base.py", line 904, in render_annotated
  67. return self.render(context)
  68. File "/root/django/myvenv/lib/python3.7/site-packages/django/template/loader_tags.py", line 188, in render
  69. return template.render(context)
  70. File "/root/django/myvenv/lib/python3.7/site-packages/django/template/base.py", line 173, in render
  71. return self._render(context)
  72. File "/root/django/myvenv/lib/python3.7/site-packages/django/template/base.py", line 163, in _render
  73. return self.nodelist.render(context)
  74. File "/root/django/myvenv/lib/python3.7/site-packages/django/template/base.py", line 937, in render
  75. bit = node.render_annotated(context)
  76. File "/root/django/myvenv/lib/python3.7/site-packages/django/template/base.py", line 904, in render_annotated
  77. return self.render(context)
  78. File "/root/django/myvenv/lib/python3.7/site-packages/django/template/defaulttags.py", line 209, in render
  79. nodelist.append(node.render_annotated(context))
  80. File "/root/django/myvenv/lib/python3.7/site-packages/django/template/base.py", line 904, in render_annotated
  81. return self.render(context)
  82. File "/root/django/myvenv/lib/python3.7/site-packages/django/template/defaulttags.py", line 209, in render
  83. nodelist.append(node.render_annotated(context))
  84. File "/root/django/myvenv/lib/python3.7/site-packages/django/template/base.py", line 904, in render_annotated
  85. return self.render(context)
  86. File "/root/django/myvenv/lib/python3.7/site-packages/django/template/defaulttags.py", line 309, in render
  87. return nodelist.render(context)
  88. File "/root/django/myvenv/lib/python3.7/site-packages/django/template/base.py", line 937, in render
  89. bit = node.render_annotated(context)
  90. File "/root/django/myvenv/lib/python3.7/site-packages/django/template/base.py", line 904, in render_annotated
  91. return self.render(context)
  92. File "/root/django/myvenv/lib/python3.7/site-packages/django/template/defaulttags.py", line 309, in render
  93. return nodelist.render(context)
  94. File "/root/django/myvenv/lib/python3.7/site-packages/django/template/base.py", line 937, in render
  95. bit = node.render_annotated(context)
  96. File "/root/django/myvenv/lib/python3.7/site-packages/django/template/base.py", line 904, in render_annotated
  97. return self.render(context)
  98. File "/root/django/myvenv/lib/python3.7/site-packages/django/template/base.py", line 993, in render
  99. return render_value_in_context(output, context)
  100. File "/root/django/myvenv/lib/python3.7/site-packages/django/template/base.py", line 972, in render_value_in_context
  101. value = str(value)
  102. File "/root/django/myvenv/lib/python3.7/site-packages/django/utils/html.py", line 388, in <lambda>
  103. klass.__str__ = lambda self: mark_safe(klass_str(self))
  104. File "/root/django/myvenv/lib/python3.7/site-packages/django/forms/boundfield.py", line 33, in __str__
  105. return self.as_widget()
  106. File "/root/django/myvenv/lib/python3.7/site-packages/django/forms/boundfield.py", line 93, in as_widget
  107. renderer=self.form.renderer,
  108. File "/root/django/myvenv/lib/python3.7/site-packages/django/forms/widgets.py", line 241, in render
  109. context = self.get_context(name, value, attrs)
  110. File "/root/django/myvenv/lib/python3.7/site-packages/django/contrib/admin/widgets.py", line 288, in get_context
  111. 'rendered_widget': self.widget.render(name, value, attrs),
  112. File "/root/django/myvenv/lib/python3.7/site-packages/django/forms/widgets.py", line 241, in render
  113. context = self.get_context(name, value, attrs)
  114. File "/root/django/myvenv/lib/python3.7/site-packages/django/forms/widgets.py", line 680, in get_context
  115. context = super().get_context(name, value, attrs)
  116. File "/root/django/myvenv/lib/python3.7/site-packages/django/forms/widgets.py", line 641, in get_context
  117. context['widget']['optgroups'] = self.optgroups(name, context['widget']['value'], attrs)
  118. File "/root/django/myvenv/lib/python3.7/site-packages/django/forms/widgets.py", line 589, in optgroups
  119. for index, (option_value, option_label) in enumerate(self.choices):
  120. File "/root/django/myvenv/lib/python3.7/site-packages/django/forms/models.py", line 1138, in __iter__
  121. yield self.choice(obj)
  122. File "/root/django/myvenv/lib/python3.7/site-packages/django/forms/models.py", line 1150, in choice
  123. return (self.field.prepare_value(obj), self.field.label_from_instance(obj))
  124. File "/root/django/myvenv/lib/python3.7/site-packages/django/forms/models.py", line 1216, in label_from_instance
  125. return str(obj)
  126. File "/root/django/app/models.py", line 52, in __str__
  127. return f'{self.user.first_name} {self.user.last_name}'
  128. File "/root/django/myvenv/lib/python3.7/site-packages/django/db/models/fields/related_descriptors.py", line 178, in __get__
  129. rel_obj = self.get_object(instance)
  130. File "/root/django/myvenv/lib/python3.7/site-packages/django/db/models/fields/related_descriptors.py", line 298, in get_object
  131. return super().get_object(instance)
  132. File "/root/django/myvenv/lib/python3.7/site-packages/django/db/models/fields/related_descriptors.py", line 145, in get_object
  133. return qs.get(self.field.get_reverse_related_filter(instance))
  134. File "/root/django/myvenv/lib/python3.7/site-packages/django/db/models/query.py", line 408, in get
  135. self.model._meta.object_name
  136. django.contrib.auth.models.User.DoesNotExist: User matching query does not exist.
Advertisement
Add Comment
Please, Sign In to add comment