This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
""" | |
Created on Thu Mar 28 18:51:00 2013 | |
UNFINISHED AND BUGGY | |
Python/SciPy implementation of the filters described in | |
"Cookbook formulae for audio EQ biquad filter coefficients" | |
by Robert Bristow-Johnson | |
http://www.musicdsp.org/files/Audio-EQ-Cookbook.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
from django.contrib.auth.decorators import login_required | |
from django.utils.cache import patch_response_headers | |
from django.utils.decorators import method_decorator | |
from django.views.decorators.cache import cache_page, never_cache | |
from django.views.decorators.csrf import csrf_exempt | |
class NeverCacheMixin(object): | |
@method_decorator(never_cache) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
from django.contrib.auth.decorators import login_required | |
from django.utils.cache import patch_response_headers | |
from django.utils.decorators import method_decorator | |
from django.views.decorators.cache import cache_page, never_cache | |
from django.views.decorators.csrf import csrf_exempt | |
class NeverCacheMixin(object): | |
@method_decorator(never_cache) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from compressor.filters import CompilerFilter | |
class CoffeeCompilerFinder(staticfiles.finders.AppDirectoriesFinder): | |
""" | |
A quick hacked up staticfiles-finder that will automatically recompile .coffee files to .js and serve the .js file | |
It will respond to a request for /foo/bar/baz.js and if the coffee-file with the same name in that same dir is newer then | |
then js-file requested then the js-file will be recompiled. | |
I did this to not have to manually recompile my scripts or use the watcher and still be compatible with require.js | |
without have to change the code once i deploy with compiled js-files. it depends on django-compressor at the moment | |
but if you dont use that its just a small class to lift out from it. |