Login

Tag "closure"

Snippet List

Google Closure support in django-compress

A filter to integrate Google Closure compiler in django-compress plugin. 1. [download django-compress](http://code.google.com/p/django-compress/) 2. install it 3. [download Closure Compiler](http://code.google.com/closure/compiler) 4. put the jar at the root of your project 5. put this snippet as a **__init__.py** file in a **google_closure** directory in the filters directory of the plugin 6. add `COMPRESS_JS_FILTERS = ('compress.filters.google_closure.GoogleClosureCompilerFilter',)` to your settings.py You can test `COMPRESS_CLOSURE_JS_ARGUMENTS = {'compilation_level': 'ADVANCED_OPTIMIZATIONS', }` in your settings.py too

  • google
  • js
  • minify
  • closure
  • compress
Read More

limit view request rate decorator

Limit rate request decorator for view. Authenificated user can't request decorated view often then timeout. Usage: @limit_request_rate(time_beetween_request_sec) def my_view(request): ... get_cell_value from [here](http://code.activestate.com/recipes/439096/)

  • django
  • cache
  • view
  • decorator
  • limit-request-rate
  • closure
  • cell
Read More

2 snippets posted so far.