1

I can't explain it but Django + SVN for code version control loads older buggy versions of files every time i hit refresh on the web site I'm working on.

So if I changed something in a file 2 days ago (made lots of commits since then) it will show up now. Next time I hit refresh another change from a day ago appears.

I'm using: Django 1.4, Apache, SVN

bmargulies
  • 97,814
  • 39
  • 186
  • 310
prototype
  • 3,303
  • 2
  • 27
  • 42

1 Answers1

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.

rockingskier
  • 9,066
  • 3
  • 40
  • 49