Question

I was wondering that i always got the wrong message when i corrected my code, but not for long, it would return the right result of my program. Is that normal?

No correct solution

OTHER TIPS

Sounds like you are not restarting the built-in django development server manually after making the changes:

The development server automatically reloads Python code for each request, as needed. You don’t need to restart the server for code changes to take effect. However, some actions like adding files don’t trigger a restart, so you’ll have to restart the server in these cases.

As documentation says, sometimes in order to see the changes, you need to restart the server manually.

Also, sometimes Django dev server reloader doesn't see the changes right away and it takes some time for the server to notice changes and trigger restart. If you see this often, restart the server manually.

Also note that in Django 1.7 kernel signals are used to autoreload the server on linux - this should make it pick up the changes and restart faster:

Changed in Django 1.7:

If you are using Linux and install pyinotify, kernel signals will be used to autoreload the server (rather than polling file modification timestamps each second). This offers better scaling to large projects, reduction in response time to code modification, more robust change detection, and battery usage reduction.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top