SASS file stuck in static/CACHE/css/ unable to update or change

Aloha,

I recently switched from CSS styling to SASS and at first, it seemed to be working fine. However, after making a few changes to the .scss file, I noticed the changes were not reflected in the browser. I use incognito mode for testing and have also cleared all the files from my browser but the same file is still pulled from the cache.

I am completely new to SASS, and this is my first ‘on-my-own’ project I am doing with Django so first and foremost any and all advise is appreciated.

I have posted this question in StackOverflow with no results so I am hoping I have better luck here.

I am using sass-processor and compressor and I have read a lot about webpack kits to help serve the files better, but to be honest, it seems pretty complicated to set up and I’m not sure my project really needs that level of… attention? I am not currently using any hashing to confirm the files, which is something that I am interested in as it seems it would avoid this problem entirely but I’m not really sure where to start on that.

The long story short of the issue I am having is that when the SASS file originally compiled it cached the file SOMEWHERE and now whenever I run the compilescss and collectstatic commands, no changes reflect in my browser and the exact same file is called every single time. I’ve tried everything I can think of, and google only gives me the same 2 articles over again which hasn’t resolved my issue…

I have been stuck on this issue for a very long time and it has completely halted my project as styling is really the main thing I have left to finish before deployment.

So I guess my core questions are:
1: Where is static/CACHE/css located?
2: How can I force Django to update the files, either manually or through hash verification.

Is this a problem you are encountering only in production mode / only in development / in both cases?

I’m usually using SASS without sass-processor, and instead use libsass, django-libsass, and compressor. This combination has proved very reliable for me.

I am still in development, have not deployed anywhere yet.

I have libsass and django-libsass installed and tried to adjust my template and settings to fit it, but my terminal still shows a GET request to the static cache location. Although it is a different file its pulling, its still not the correct stylesheet. Could you possibly provide any useful resources on it?

Seems like the issue is probably less with the SASS setup and more with the static files setup. How are you serving the static files? Are you using the recommended development setup à la this snippet?

if DEBUG is True:
    from django.conf.urls.static import static
    urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)

I have had issues in the past with static files. My settings pretty much follow the Django docs, however, I chose to store all static files in one central place rather than in each app. Previously I had an issue with the images.

STATIC_URL = '/static/'
STATIC_ROOT = os.path.join(BASE_DIR, '/my_portfolio/my_portfolio/static/')
STATICFILES_DIRS = [
    os.path.join(BASE_DIR, 'my_portfolio/static'),
]
STATICFILES_FINDERS = [
    'compressor.finders.CompressorFinder',
]

MEDIA_ROOT = os.path.join(BASE_DIR, 'my_portfolio/img')
MEDIA_URL = '/img/'