On Thursday, March 6, 2014 11:38:07 PM UTC-4:30, Vernon Burt wrote:
>
> I've pretty quikly found out in my DJango adventure that I need to have 
> some kind of versioning for my static css and javascript files. After 
> talking to some web developers I was directed to use Django's 
> CachedStaticFilesStorage app to append an md5 hash to the static files 
> path. No matter how I set my static settings the files don't seem to get 
> the has appended and  I can no longer link to any of my static files, 
> either directly or using the static directive. I was wondering if anyone 
> might know what I am doing wrong.
>
> My  Settings:
>
> STATIC_ROOT = 'staticfiles'
>
> STATIC_URL = ''
> # Additional locations of static files
> STATICFILES_DIRS = ()
>
> STATICFILES_FINDERS = (
>     'django.contrib.staticfiles.finders.FileSystemFinder',
>     'django.contrib.staticfiles.finders.AppDirectoriesFinder',)
>
> STATICFILES_STORAGE = 
> 'django.contrib.staticfiles.storage.CachedStaticFilesStorage'
>
>
> My Template entry:
>
> {% block cssfiles %}{% load static%}<link href="{% static 
> "/static/css/map.css" %}" media="screen">{% endblock %}
>
> Anything that can point me in the right direction would help.If intrested, 
> I've also had this question up on StackOverflow for a few days: 
> http://stackoverflow.com/questions/22130697/djangos-cachedstaticfilesstorage-not-hashing-file-urls
>  
>
> Hello,

You should put a path in your STATIC setting:
https://docs.djangoproject.com/en/1.6/howto/static-files/

Your static path should be pointing to a real path accessible from  the 
path you are running your app.

Camilo.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/6f77ea3a-53ca-4d90-bd86-b55ae5835fe2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to