i currently work on a project , i want to build it with django 3.0.2 python version 3.7, but after running the server
python manage.py runserver
it will quit immediately when i try to access the admin url without raise any error , and even i havn't do any changes in my new app ,and also tried django version 2x it worked as i expected .
i tried to remove and reinstall django , but still give the same output ,
thanks for advice
You're very likely to be running into this issue:
Python 3.7 crashes after trying to visit admin page on Windows and MacOS.
The solution is to upgrade to Python version 3.7.1 or higher.
Related
I'm a noob trying to learn Django for the first time, I created a project in a virtualenv on Windows 10. It worked well in the beginning where I was able to login to the admin section after running '''python manage.py runserver'''
But now when I run the same command I'm able to see the Django landing page but as soon as I try to hit http://localhost:8000/admin/ or http://127.0.0.1:8000/admin the server automatically disconnects and I get the "This site can’t be reached" error on Chrome.
I tried changing the port number by running python manage.py runserver 0.0.0.0:8001 but it didn't work. I tried to check if the port (8000) is currently in use by running the cmd (as an admin) netstat -a -b but couldn't find any issues.
The server just quits without any error message
Edit: Currently using Python 3.7.0 and django-3.0.1
There's a ticket about this issue: https://code.djangoproject.com/ticket/31067.
This seems to be a bug in Python 3.7.0, and appears to be fixed in Python 3.7.1. It's still unknown what the exact trigger is for this bug.
Since Django officially only supports the latest patch release of a Python series, this won't be fixed in Django. You can either upgrade your Python version to the latest patch release of 3.7, or downgrade Django to 2.2.
It's a Django 3.0 issue as I've seen. There are so many issues on GitHub, regarding this error.
You may try downgrading to Django 2.* versions for now. Version 2.1/2.2 works fine.
I am following the django docs tutorial to build a polls app i just created the superuser but whenever i try to access the admin page the server quits on its own with no error message that's in both chrome and firefox i'm on windows
You need to check your version numbers of Django and Python to ensure compatibility. There is a problem with Django 3.0 (the latest version) and with version 3.7.0 of Python and potentially its older versions as well.
Try updating your Python installation to see if that fixes the issue.
I start with Django 2.0.2 course. I discovered that in chrome I get on http://127.0.0.1:8000/ the Django Home page, in Firefox Dev. as well. On opening http://127.0.0.1:8000/admin in chrome it works as expected http://127.0.0.1:8000/admin/login/?next=/admin/. However in firefox I get 'no such table: Django_session'.
I work in Windows 10, virtualenv created by pipenv.
What is wrong?
You probably need to run python manage.py migrate command to create django_sessions table in your database.
I upgraded our existing site to Wagtail 2.3 from Wagtail 2.1, everything went smoothly and it works fine.
I saw support for Django 2.1 was included, so I upgraded Django - it successfully applied the migrations but froze before script completion. I had to close the terminal window to stop it (cntl-c didn't work).
I also could not login to the site - runserver would freeze up the same way. I tried this with Django 2.1, 2.1.1, 2.1.2, 2.1.3, 2.1.4 - all with the same results.
I've downgraded to Django 2.0.9 and everything is working fine. I'm not sure if this is a Django bug, a Wagtail bug, or a project bug. There is no output when running migrate or runserver.
I did look at my Postgres processes - it looked like it was freezing up while trying to read permissions for a user or something related to the content types.
I'm looking for ideas on what else I can check to debug this.
I migrated my Django app from 1.4.3 to 1.7.1
I got it working for a short while
but now every time I try to run the development server it gets stuck on:
C:\Users\DAVID\Documents\TinyTap-web\tinytap>python manage.py runserver
Performing system checks...
System check identified some issues:
WARNINGS:
?: (1_6.W001) Some project unittests may not execute as expected.
HINT: Django 1.6 introduced a new default test runner. It looks like this project was generated using Django 1.5 or earlier. You should ensure
. See https://docs.djangoproject.com/en/dev/releases/1.6/#new-test-runner for more information.
System check identified 1 issue (0 silenced).
the localhost is not working , also tried with other IP/ports = same results.
I could get rid of this warning by adding TEST_RUNNER = 'django.test.runner.DiscoverRunner' to the settings file, but still development server is not running
Apparently it was related to migrations and "CircularDependencyError".
After deleting the database , and the migration folders and running manage.py migrate
I was finally able to runserver
Trying creating a new project
django-admin.py startproject mysite
If it works then there's problem with the current project you're trying to run. (You'll need to give us more information for us to help)