Ok. I was trying something similar and I found that getting ant and svn talking nicely was a hassle. I ended up coming up with another solution that I've never heard of anyone else using that I think makes some sense.
Instead of the svn version number, I have my ant build script take the checksum of the js/css file and append it to the url of the file. Every time the file changes, its checksum changes. The nice thing is that ant has a built in checksum command and there's no need for any svn integration, making the whole thing more portable. In the base template: <link rel="stylesheet" type="text/css" href="/media/css/main.css? v=CSS_CHECKSUM" /> In build.xml: <checksum file="media/css/main.css" property="css_checksum"/> <property name="base_template" location="${dist}/templates/app/ includes/base.html"/> <replace file="${base_template}" value="${css_checksum}"> <replacetoken>CSS_CHECKSUM</replacetoken> </replace> I figured I'd throw this out there in case others are looking for alternate solutions. Peace, Udi On Jun 16, 4:52 am, Gábor Farkas <[EMAIL PROTECTED]> wrote: > Udi wrote: > > Mind if I ask why? > > i've got the idea from > here:http://www.thinkvitamin.com/features/webapps/serving-javascript-fast > > the idea is that you serve all your media files (js/css/png/jpg) > at urls that contain for example the svn version number, > like: > > /media/1432/js/form.js > > and you setup your webserver to send such headers along the file > which says that the file does not need to be re-fetched for a very long > time (let's say a year). > > and when you release a new version of your program, > then, because the version-number has changed, all your media-urls change. > but it's much better described in the article. > > btw. for the reference, i abandoned the "svnversion" approach. > it produces some funny version numbers when you use svn:externals, > so i went with "svn info" and extracting the version-number from there. > > and, for now i decided that i will not do it at the startup, but will do > it at release-time (so i will extract the version-number at the > release-time, save it to let's say revision.py, and import it into > settings.py). > > gabor --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---