[Answered ]-Django project and SVN loads older code versions

2👍

This is not to do with SVN, I use git and have the same issue. Apache will cache a certain amount of your site.

Delete all *.pyc files and restart apache.

I have a number of (Ubuntu) aliases set up to help me do this.

# Services
# Restart apache2
alias apre='sudo service apache2 graceful'

# Delete files
# Delete all *.pyc files
alias pydel='find . -type f -name "*.pyc" -exec rm -f {} \;'

# Combinations
# Delete all *.pyc files then restart apache2
alias pyre='pydel && apre'

Alternatively develop using runserver as this will pick up changes when you save a file within your Django project.

Leave a comment