6đź‘Ť
Django dev server restarts it self when python code changes. This may not happed if you run it with noreload option
./manage.py runserver –noreload
Another case when the server is not reloaded automatically is when the files changes is not used by django. For example if you have syntax error in your admin.py django won’t use it. And changing it won’t restart the server.
Have in mind that if you use eclipse debug you will have to run django with noreload because of an bug that does not relaunch the instance but starts a new one.
2đź‘Ť
First, configure the project as a django project in eclipse, if not already so. (Right click on the project, and select PyDev -> Set as Django Project).
Second, click on the green run button at the top, and select “run configurations”. Select the PyDev Django icon and hit the new launch configuration button at the top. Enter the project name, (let’s say testproject), and “${workspace_loc:testproject}/${DJANGO_MANAGE_LOCATION}” for the main module.
On the Arugments tab, enter “runserver 0.0.0.0:8000 –noreload” if you want to your server to be visible for machines outside yours, or “runserver –noreload” if you want access on your machine only, and change the working directory to “${workspace_loc:}”.
Click apply and you should be set to go!
Here’s what it should look like when running inside of eclipse:
- [Django]-Calculating distance between two points using latitude longitude and altitude (elevation)
- [Django]-Creating SubCategories with Django Models
- [Django]-Which Server for Django
- [Django]-Celery beat process running on Heroku sends task twice
- [Django]-Problems with using Select2 and Bootstrap styling