book preview js/css compressing
authorMarcin Koziej <marcin.koziej@nowoczesnapolska.org.pl>
Thu, 26 Apr 2012 10:11:22 +0000 (12:11 +0200)
committerMarcin Koziej <marcin.koziej@nowoczesnapolska.org.pl>
Thu, 26 Apr 2012 10:11:22 +0000 (12:11 +0200)
apps/catalogue/templates/catalogue/book_text.html
redakcja/settings/compress.py

index dc7a80d..b9cc2f0 100644 (file)
@@ -1,17 +1,13 @@
-{% load i18n %}
+{% load i18n compressed %}
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml">
     <head>
         <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
         <title>{% trans "Redakcja" %} :: {{ book.title }}</title>
-       <link rel="stylesheet" type="text/css" href="/media/static/css/book.css" />
+       {% compressed_css 'book' %}
         <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
-       <script type="text/javascript" src="/media/static/js/book_text/jquery.eventdelegation.js"></script>
-       <script type="text/javascript" src="/media/static/js/book_text/jquery.scrollto.js"></script>
-       <script type="text/javascript" src="/media/static/js/book_text/jquery.highlightfade.js"></script>
-       <script type="text/javascript" src="/media/static/js/book_text/book.js"></script>
-
+       {% compressed_js 'book' %}
     </head>
     <body>
         <div id="menu">
index d4425c2..bdcf44b 100644 (file)
@@ -18,6 +18,12 @@ COMPRESS_CSS = {
             'css/filelist.css',
         ),
         'output_filename': 'compressed/catalogue_styles_?.css',
+     },
+     'book': {
+        'source_filenames': (
+            'css/book.css',
+        ),
+        'output_filename': 'compressed/book_?.css',         
      }
 }
 
@@ -65,7 +71,16 @@ COMPRESS_JS = {
                 'email_mangler/email_mangler.js',
         ),
         'output_filename': 'compressed/catalogue_scripts_?.js',
-     }
+     },
+     'book': {
+        'source_filenames': (
+            'js/book_text/jquery.eventdelegation.js',
+            'js/book_text/jquery.scrollto.js',
+            'js/book_text/jquery.highlightfade.js',
+            'js/book_text/book.js',
+        ),
+        'output_filename': 'compressed/book_?.js',
+         }
 }
 
 COMPRESS = True