peppelorum

Untitled

Jan 5th, 2012
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 1.04 KB | None | 0 0
  1. In template:
  2.  
  3.     {% compress css %}
  4.         <link rel="stylesheet" type="text/css" href="/static/foundation/stylesheets/globals.css"/>
  5.         <link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}/foundation/stylesheets/grid.css" />
  6.     {% endcompress %}
  7.  
  8.  
  9. In settings.py:
  10.  
  11. COMPRESS_OFFLINE_CONTEXT = {
  12.     'STATIC_URL': STATIC_URL,
  13.     'MEDIA_URL': MEDIA_URL,
  14. }
  15.    
  16. Debug shows:
  17.  
  18. /Users/peppe/Envs/Pipiki/lib/python2.7/site-packages/compressor/templatetags/compress.py in render
  19.         rendered_output = self.render_output(compressor, forced)
  20.  
  21.  
  22. context
  23. [[{'paginator': <django.core.paginator.Paginator object at 0x102c20950>, 'page_obj': <Page 1 of 16>}, {'csrf_token': <django.utils.functional.__proxy__ object at 0x102ee1850>}, {'perms': <django.utils.functional.__proxy__ object at 0x102ee1890>, 'messages': <django.utils.functional.__proxy__ object at 0x102ee1910>, 'user': <django.utils.functional.SimpleLazyObject object at 0x102ee18d0>}, {'MEDIA_URL': '/media/'}, {'compressed': {'name': None}, 'STATIC_URL': '/static/'}]]
Advertisement
Add Comment
Please, Sign In to add comment