I'm running a Django project with one app through an Apache server on Ubuntu with mod_wsgi.
When I run it locally on the development server, all works fine. But when I upload the files to the main server, for the first couple of page requests, it seems like it is still trying to load the old HTML pages, which is causing problems communicating with the apparently up-to-date Views.py
.
For example, I have this error on the main server version:
UnboundLocalError at /dms/home/
local variable 'in_use_bottles' referenced before assignment
Request Method: GET
Exception Type: UnboundLocalError
Exception Value:
local variable 'in_use_bottles' referenced before assignment
in_use_bottles
was used in an old version of the page, but no longer, and when I less
the file on the server, I see no reference to it. Of course, when I click refresh about 2 or 3 times, it suddenly works.
Does anyone have any ideas? I'm guessing it's some Apache/Django quirk with caching, but I'm not experienced enough with Django to know for sure.