I’m new to django, so I don’t really know about this:
First, I type python manage.py runserver in C:/----/ Desktop /- -----djangoproject in which I already created a super user. Whenever I go to localhost:8000/admin , it says A server error occurred. Please contact the administrator.. I’ve tried reloading and python manage.py runserver many many times. And yet it shows that same error. How can I fix it? Heres my files (Please don’t distribute them)
There should be a more complete traceback in the console window in which you’re running runserver.
Please post that complete traceback here.
(When posting code or tracebacks, enclose the text between lines of three backtick - ` characters. You’ll have a line of ```, then your code (or traceback), then another line of ```.)
Performing system checks...
System check identified no issues (0 silenced).
February 13, 2022 - 13:06:05
Django version 4.0.2, using settings 'mydjangoproject.settings'
Starting development server at http://127.0.0.1:8000/
Quit the server with CTRL-BREAK.```
That's it. All it says on the command prompt.
The `server` eror is on the page.
There should at least be one line after that that looks something like this: [13/Feb/2022 13:27:26] "GET /admin/ HTTP/1.1" 200 12687
If you don’t have a line like that, then there’s a chance that you have a different process running on your system that is attached to port 8000 - or you have a firewall running that has that port blocked.
First thing I’d try here would be to run this on a different port - 8080 is a good one to try.