Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

[1.5.x] Fixed #19333 -- Moved compress.py outside of the admin static…

… folder. Thanks to camilonova, Russell Keith-Magee, Aymeric Augustin and Ramiro Morales for the feedback.

Backport of c9c40bc
  • Loading branch information...
commit be5369fd24adfc788e59eaf0363d4d137ded6ef8 1 parent e18bd68
Julien Phalip authored February 02, 2013
4  django/contrib/admin/static/admin/js/compress.py → django/contrib/admin/bin/compress.py
@@ -4,7 +4,7 @@
4 4
 import subprocess
5 5
 import sys
6 6
 
7  
-here = os.path.dirname(__file__)
  7
+js_path = os.path.join(os.path.dirname(os.path.dirname(__file__)), 'static', 'admin', 'js')
8 8
 
9 9
 def main():
10 10
     usage = "usage: %prog [file1..fileN]"
@@ -27,7 +27,7 @@ def main():
27 27
     if not args:
28 28
         if options.verbose:
29 29
             sys.stdout.write("No filenames given; defaulting to admin scripts\n")
30  
-        args = [os.path.join(here, f) for f in [
  30
+        args = [os.path.join(js_path, f) for f in [
31 31
             "actions.js", "collapse.js", "inlines.js", "prepopulate.js"]]
32 32
 
33 33
     for arg in args:
6  docs/internals/contributing/writing-code/submitting-patches.txt
@@ -176,8 +176,10 @@ Compressing JavaScript
176 176
 ~~~~~~~~~~~~~~~~~~~~~~
177 177
 
178 178
 To simplify the process of providing optimized javascript code, Django
179  
-includes a handy script which should be used to create a "minified" version.
180  
-This script is located at ``django/contrib/admin/static/admin/js/compress.py``.
  179
+includes a handy python script which should be used to create a "minified"
  180
+version. To run it::
  181
+
  182
+    python django/contrib/admin/bin/compress.py
181 183
 
182 184
 Behind the scenes, ``compress.py`` is a front-end for Google's
183 185
 `Closure Compiler`_ which is written in Java. However, the Closure Compiler

0 notes on commit be5369f

Please sign in to comment.
Something went wrong with that request. Please try again.