#19333: Collect static copies a .py file -------------------------------+------------------------------------ Reporter: camilonova | Owner: nobody Type: Bug | Status: new Component: contrib.admin | Version: 1.4 Severity: Normal | Resolution: Keywords: | Triage Stage: Accepted Has patch: 1 | Needs documentation: 0 Needs tests: 0 | Patch needs improvement: 0 Easy pickings: 0 | UI/UX: 0 -------------------------------+------------------------------------
Comment (by ramiro): Replying to [comment:8 aaugustin]: > After your changes the script works only if you pass file names in argument or if you run it from `django/contrib/admin/static/admin/js`. Accordign to my understanding of the code it's also the current behavior. No changes here. > > The `here` variable should be called `admin_js_dir`, because that's what it really is :) If I'm right above, the meaning of this var hasn't changed either it is the CWD from which the script is being executed (not the dir where the script is located). > > I suggest renaming that variable and pointing it to `os.path.join(os.path.dirname(os.path.dirname(__file__)), 'static', 'admin', 'js')` (to be tested, I just wrote it in this comment as an example). > > Otherwise, that's the correct fix IMO. The only change this patch introduces is that to ejecute compress.py one needs to specify its full path (e.g. `python ../../../bin/compress.py`). Remember the intended potential uses of this script are core devs and people contributing with the admin app by submitting JS patches. -- Ticket URL: <https://code.djangoproject.com/ticket/19333#comment:9> Django <https://code.djangoproject.com/> The Web framework for perfectionists with deadlines. -- You received this message because you are subscribed to the Google Groups "Django updates" group. To post to this group, send email to django-updates@googlegroups.com. To unsubscribe from this group, send email to django-updates+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.