On Sunday, November 11, 2012 8:09:23 AM UTC-8, Justin Holmes wrote: > > My sense is that there are a growing number of use cases, but the one that > I currently have in mind is for django-coldbrew. I want to be able to > compile all the coffeescript in a project during the collectstatic > process. Currently, we have a management command, "collect_coldbrew" - but > I'd like to allow users to have this occur automatically during > collectstatic. >
Why not have your collect_coldbrew wrap collectstatic - then you have one command? While there are parts of the staticfiles API that should probably be opened more some day - for now it is a relatively private API. What Bruno has suggested uses technically private API. Such a signal as proposed would seem to be a way around https://code.djangoproject.com/ticket/15213 - and introducing a signal for such a narrow use is gonna be the wrong way to address this. There are a couple other alternatives: A custom storage backend (public API) that does the compiling before writing the file (this could feel unintuitive). or use django-compressor which handles this action via template tags: http://django_compressor.readthedocs.org/en/latest/settings/#django.conf.settings.COMPRESS_PRECOMPILERS -Preston > I'm not sure if the best timing for the signal is at the end of the > complete collectstatic process or at the end of each iteration (ie, one > signal for each static directory that django finds). > > > On Sun, Nov 11, 2012 at 4:55 AM, Alex Gaynor <alex....@gmail.com<javascript:> > > wrote: > >> What's the use case? >> >> Alex >> >> >> On Sat, Nov 10, 2012 at 8:48 PM, Justin Holmes >> <jus...@justinholmes.com<javascript:> >> > wrote: >> >>> Currently, our only built-in management signal is post-syncdb. >>> >>> I propose (and, notwithstanding objection, will build) >>> post-collectstatic. >>> >>> Is this reasonable? Is there another, less invasive way to hook logic >>> into collectstatic? >>> >>> >>> -- >>> Justin Holmes >>> Chief Chocobo Breeder, slashRoot >>> >>> slashRoot: Coffee House and Tech Dojo >>> New Paltz, NY 12561 >>> 845.633.8330 >>> >>> -- >>> You received this message because you are subscribed to the Google >>> Groups "Django developers" group. >>> To post to this group, send email to >>> django-d...@googlegroups.com<javascript:> >>> . >>> To unsubscribe from this group, send email to >>> django-develop...@googlegroups.com <javascript:>. >>> For more options, visit this group at >>> http://groups.google.com/group/django-developers?hl=en. >>> >> >> >> >> -- >> "I disapprove of what you say, but I will defend to the death your right >> to say it." -- Evelyn Beatrice Hall (summarizing Voltaire) >> "The people's good is the highest law." -- Cicero >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Django developers" group. >> To post to this group, send email to >> django-d...@googlegroups.com<javascript:> >> . >> To unsubscribe from this group, send email to >> django-develop...@googlegroups.com <javascript:>. >> For more options, visit this group at >> http://groups.google.com/group/django-developers?hl=en. >> > > > > -- > Justin Holmes > Chief Chocobo Breeder, slashRoot > > slashRoot: Coffee House and Tech Dojo > New Paltz, NY 12561 > 845.633.8330 > -- You received this message because you are subscribed to the Google Groups "Django developers" group. To view this discussion on the web visit https://groups.google.com/d/msg/django-developers/-/ae2y0-BLq4UJ. To post to this group, send email to django-developers@googlegroups.com. To unsubscribe from this group, send email to django-developers+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-developers?hl=en.