lamiastella

traceback

Jul 18th, 2016
314
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.63 KB | None | 0 0
  1. ValueError at /post/new/
  2. Cannot assign "<SimpleLazyObject: <django.contrib.auth.models.AnonymousUser object at 0x03D807F0>>": "Post.author" must be a "User" instance.
  3. Request Method: POST
  4. Request URL: http://localhost:8000/post/new/
  5. Django Version: 1.9.8
  6. Exception Type: ValueError
  7. Exception Value:
  8. Cannot assign "<SimpleLazyObject: <django.contrib.auth.models.AnonymousUser object at 0x03D807F0>>": "Post.author" must be a "User" instance.
  9. Exception Location: C:\Users\jalal\myvenv\lib\site-packages\django\db\models\fields\related_descriptors.py in __set__, line 207
  10. Python Executable: C:\Users\jalal\myvenv\Scripts\python.exe
  11. Python Version: 3.4.2
  12. Python Path:
  13. ['C:\\Users\\jalal\\monadjango',
  14. 'C:\\WINDOWS\\system32\\python34.zip',
  15. 'C:\\Python34\\DLLs',
  16. 'C:\\Python34\\lib',
  17. 'C:\\Python34',
  18. 'C:\\Users\\jalal\\myvenv',
  19. 'C:\\Users\\jalal\\myvenv\\lib\\site-packages']
  20. Server time: Mon, 18 Jul 2016 19:35:15 -0500
  21. Traceback Switch to copy-and-paste view
  22.  
  23. C:\Users\jalal\myvenv\lib\site-packages\django\core\handlers\base.py in get_response
  24. response = self.process_exception_by_middleware(e, request) ...
  25. ▶ Local vars
  26. C:\Users\jalal\myvenv\lib\site-packages\django\core\handlers\base.py in get_response
  27. response = wrapped_callback(request, *callback_args, **callback_kwargs) ...
  28. ▶ Local vars
  29. C:\Users\jalal\monadjango\blog\views.py in post_new
  30. post.author = request.user ...
  31. ▶ Local vars
  32. C:\Users\jalal\myvenv\lib\site-packages\django\db\models\fields\related_descriptors.py in __set__
  33. self.field.remote_field.model._meta.object_name, ...
  34. ▶ Local vars
Advertisement
Add Comment
Please, Sign In to add comment