A newbie server error occured

50 views
Skip to first unread message

Piotr Trybowski

unread,
Jun 14, 2018, 5:28:41 PM6/14/18
to Django users
So I'm following the tutorial from: https://docs.djangoproject.com/en/2.1/intro/tutorial02/ and I'm stuck at opening the admin site.
When i run command runserver i get no error and prompt: 

"C:\Program Files\JetBrains\PyCharm 2018.1.4\bin\runnerw.exe" C:\Users\Username\Downloads\WinPython-64bit-3.6.2.0Qt5\python-3.6.2.amd64\python.exe "C:\Program Files\JetBrains\PyCharm 2018.1.4\helpers\pycharm\django_manage.py" runserver C:/Users/Username/PycharmProjects/strona2
Tracking file by folder pattern: migrations
Performing system checks...

System check identified no issues (0 silenced).
June 14, 2018 - 18:27:17
Django version 2.0.6, using settings 'strona2.settings'
Starting development server at http://127.0.0.1:8000/
Quit the server with CTRL-BREAK.


So everything should work propperly, but when I open the http://127.0.0.1:8000/admin/ i get this error:
A server error occured. Please contact the administrator.

I have tried migrating again, I have tried using different port. The /polls/ section works. I asked everywhere and i'm out of ideas. Thanks for your help.

As stated in prompt above I'm using Django 2.0.6 and python 3.6.2. Also I'm on windows and running everything through Pycharm. No problems up to this point

Artur Gontijo

unread,
Jun 14, 2018, 8:56:04 PM6/14/18
to Django users
Hi,

Did you check if you have the admin app listed in the setings.py?
INSTALLED_APPS = [
    'django.contrib.admin',
    'more_apps',
]

And what about your url.py? Does it have the /admin routing?
path('admin/', admin.site.urls),
Reply all
Reply to author
Forward
0 new messages