tags:

views:

77

answers:

1

Hello for everybody. Sorry for totally stupid question, but the situation is that I have to make some changes to the Django website, and I have about zero knowleges in python.

I've been reading Django docs and found out where to make changes, but there is very strange situation. When I change view, template, config or anything on web site - nothing happens.

It looks like code is cached. When I completely delete the site's folder - everithing works fine except css stops working.

The only file that is vital and lays outside the site's folder is starter.py whith code

#!/usr/local/bin/pthon2.3

    import sys, os

    .... importing some pathes and other conf stuff

    import django.core.handlers.wsgi
    application = django.core.handlers.wsgi.WSGIHandler()

Please can anybody tell my what am I doing wrong?

+3  A: 

Python web applications typically differ from PHP ones in that the software is not automatically reloaded once you change the source code. This makes sense because initialization, firing up the interpreter etc., doesn't have to be performed at each instance. It's not that the code is "cached"; it's only loaded once. (Python does cache its bytecode, but this it transparently detects changes, so you needn't worry about that.) So you need to find a means to restart the WSGI program. How this is done in your particular webhosting environment is for you to find out, with the help of the web host or system administrator.

In addition to this, Django does cache its views (if that feature is turned on). You'll need to invalidate the caches in that case.

loevborg
Thank you, loevborg
er-v