<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>utils.py</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -1,11 +1,13 @@
 from django.conf import settings
+from yslow import utils
+
 def version(request):
     &quot;&quot;&quot;Insert version info into the context.
     
-    If DEBUG mode is ON, return empty version string.
-    If DEBUG mode is OFF, return version string from settings.
+    If optimization is OFF, return empty version string.
+    If optimization is ON, return version string from settings.
     &quot;&quot;&quot;
-    if settings.DEBUG:
+    if not utils.should_optimize():
         return {'VERSION_STRING':''}
     else:
         if hasattr(settings, 'VERSION'):</diff>
      <filename>context_processors.py</filename>
    </modified>
    <modified>
      <diff>@@ -1,6 +1,7 @@
 from django.template import Node, NodeList, Template, Context, Variable, Library
 from django.template import TemplateSyntaxError, VariableDoesNotExist
 from django.conf import settings
+from yslow import utils
 
 register = Library()
 
@@ -9,8 +10,8 @@ def ifprod(parser, token):
     
     Concatenated file has to be generated prior to this, by running the management command &quot;build&quot;.
     
-    If settings.DEBUG mode is OFF, replaces enclosed &lt;script&gt; tags with one &lt;script&gt; tag.
-    If settings.DEBUG mode is ON, does nothing.
+    If optimization is OFF, replaces enclosed &lt;script&gt; tags with one &lt;script&gt; tag.
+    If optimization is ON, does nothing.
     
     It makes sure to include a script or css stylesheet only once per entire template.
     &quot;&quot;&quot;
@@ -36,7 +37,7 @@ class IfProdNode(Node):
         self.rendered = False
     
     def render(self, context):
-        if settings.DEBUG:
+        if not utils.should_optimize():
             return self.nodelist.render(context)
         elif not self.rendered:
             resolved_new_file = Template(self.new_file).render(context)</diff>
      <filename>templatetags/yslowtags.py</filename>
    </modified>
  </modified>
  <removed type="array">
    <removed>
      <filename>views.py</filename>
    </removed>
  </removed>
  <parents type="array">
    <parent>
      <id>b81445ec726cfeb549677b08bd6dcc82074f34f3</id>
    </parent>
  </parents>
  <author>
    <name>Harish Mallipeddi</name>
    <email>harish.mallipeddi@gmail.com</email>
  </author>
  <url>http://github.com/mallipeddi/django-yslow/commit/8873ff8fa9ea55e6c3c9c026543749a8f12f762e</url>
  <id>8873ff8fa9ea55e6c3c9c026543749a8f12f762e</id>
  <committed-date>2008-05-21T00:18:52-07:00</committed-date>
  <authored-date>2008-05-21T00:18:52-07:00</authored-date>
  <message>Added support for a new flag YSLOW_OPTIMIZE</message>
  <tree>ceee08e561e6b4d276ac8f6b9ffcd06d957b5bf7</tree>
  <committer>
    <name>Harish Mallipeddi</name>
    <email>harish.mallipeddi@gmail.com</email>
  </committer>
</commit>
