-2

AttributeError at /admin/ 'WSGIRequest' object has no attribute 'user' Request Method: GET Request URL: http://127.0.0.1:8000/admin/ Django Version: 2.0.2 Exception Type: AttributeError Exception Value:
'WSGIRequest' object has no attribute 'user' Exception Location: C:\Users\vaaz\Desktop\venv\lib\site-packages\django\contrib\admin\sites.py in has_permission, line 186 Python Executable: C:\Users\vaaz\Desktop\venv\Scripts\python.exe Python Version: 3.4.3 Python Path:
['C:\Users\vaaz\website1', 'C:\Windows\system32\python34.zip', 'C:\Users\vaaz\Desktop\venv\DLLs', 'C:\Users\vaaz\Desktop\venv\lib', 'C:\Users\vaaz\Desktop\venv\Scripts', 'C:\Python34\Lib', 'C:\Python34\DLLs', 'C:\Users\vaaz\Desktop\venv', 'C:\Users\vaaz\Desktop\venv\lib\site-packages'] Server time: Mon, 12 Mar 2018 10:21:49 +0000

abdul
  • 37
  • 6

1 Answers1

0

This looks similar to this post

with your limited error description I can only suggest a few things that were mentioned in the above post:

  1. Older Django versions use MIDDLEWARE_CLASSES = (...) in the settings.py rather than MIDDLEWARE = (...) try changing that variable.
  2. If you are using virtualenv be sure to activate it before trying to runserver
  3. If you created your app in a different version of Django and then installed it on another version it might give you errors.
craigjames
  • 81
  • 5