Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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.
  • Loading branch information...
commit c9c40bc6bc64e67365338751e4967d86d0882abf 1 parent 0694d21
Julien Phalip jphalip authored
4 django/contrib/admin/static/admin/js/compress.py → django/contrib/admin/bin/compress.py
View
@@ -4,7 +4,7 @@
import subprocess
import sys
-here = os.path.dirname(__file__)
+js_path = os.path.join(os.path.dirname(os.path.dirname(__file__)), 'static', 'admin', 'js')
def main():
usage = "usage: %prog [file1..fileN]"
@@ -27,7 +27,7 @@ def main():
if not args:
if options.verbose:
sys.stdout.write("No filenames given; defaulting to admin scripts\n")
- args = [os.path.join(here, f) for f in [
+ args = [os.path.join(js_path, f) for f in [
"actions.js", "collapse.js", "inlines.js", "prepopulate.js"]]
for arg in args:
6 docs/internals/contributing/writing-code/submitting-patches.txt
View
@@ -176,8 +176,10 @@ Compressing JavaScript
~~~~~~~~~~~~~~~~~~~~~~
To simplify the process of providing optimized javascript code, Django
-includes a handy script which should be used to create a "minified" version.
-This script is located at ``django/contrib/admin/static/admin/js/compress.py``.
+includes a handy python script which should be used to create a "minified"
+version. To run it::
+
+ python django/contrib/admin/bin/compress.py
Behind the scenes, ``compress.py`` is a front-end for Google's
`Closure Compiler`_ which is written in Java. However, the Closure Compiler

2 comments on commit c9c40bc

Camilo Nova

@jphalip nice, thanks.

Jannis Leidel
Owner

:rollseyes:

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