Re: Proposal: installmedia command - A story for distributing media with apps

2008-09-22 Thread Travis Cline
On Sep 20, 8:20 am, Erik Allik <[EMAIL PROTECTED]> wrote: > I see your point about overriding reusable app media. > > I got an idea though when reading your post. Since people want to > update reusable apps to a more recent version/revision and since that > means the media files will/might

Re: Proposal: installmedia command - A story for distributing media with apps

2008-09-20 Thread Erik Allik
I see your point about overriding reusable app media. I got an idea though when reading your post. Since people want to update reusable apps to a more recent version/revision and since that means the media files will/might change, why not add another command that would show which installed

Re: Proposal: installmedia command - A story for distributing media with apps

2008-09-20 Thread Brian Beck
On Sep 20, 6:58 am, Erik Allik <[EMAIL PROTECTED]> wrote: > Has anyone got some good use cases where the template-loaded mimicking   > behavior would be desired? Otherwise it's just needless complexity in   > my opinion. Well, first of all, it's not really complexity at all. If it were to just

Re: Proposal: installmedia command - A story for distributing media with apps

2008-09-20 Thread Erik Allik
> If multiple apps provide a media file of the same name, use the file > provided by the app listed first in INSTALLED_APPS - this mimics the > template loader behavior. In interactive mode (-i), you may specify > which app to select from for each such file. With this command, best > practice

Re: Proposal: installmedia command - A story for distributing media with apps

2008-09-19 Thread Brian Beck
On Sep 19, 4:26 pm, Brian Beck <[EMAIL PROTECTED]> wrote: > I also have an implementation that I'll post when I get home. I just posted my collectmedia (I liked the name Rajeev used) command here: http://www.djangosnippets.org/snippets/1068/ It's a long snippet because it includes an

Re: Proposal: installmedia command - A story for distributing media with apps

2008-09-19 Thread Brian Beck
I noticed that elwaywitvac just posted this management command here: http://www.djangosnippets.org/snippets/1066/ I also have an implementation that I'll post when I get home. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google

Re: Proposal: installmedia command - A story for distributing media with apps

2008-09-16 Thread Samuel Cormier-Iijima
On Sep 16, 11:05 pm, Brian Beck <[EMAIL PROTECTED]> wrote: > On Sep 16, 10:49 pm, "Rajeev J Sebastian" <[EMAIL PROTECTED]> > wrote: > > > A problem would be referencing images, and media in css/js files. > > Currently, in all our projects we use /site_media/ as the MEDIA_URL, > > so this not a

Re: Proposal: installmedia command - A story for distributing media with apps

2008-09-16 Thread Brian Beck
On Sep 16, 10:49 pm, "Rajeev J Sebastian" <[EMAIL PROTECTED]> wrote: > A problem would be referencing images, and media in css/js files. > Currently, in all our projects we use /site_media/ as the MEDIA_URL, > so this not a problem. But for a true solution, there should be a > preprocessor for

Re: Proposal: installmedia command - A story for distributing media with apps

2008-09-16 Thread Rajeev J Sebastian
On Wed, Sep 17, 2008 at 7:47 AM, sciyoshi <[EMAIL PROTECTED]> wrote: > > On Sep 16, 7:31 pm, Brian Beck <[EMAIL PROTECTED]> wrote: >> On Sep 16, 7:22 pm, Julien Phalip <[EMAIL PROTECTED]> wrote: >> >> > I really like the idea. However, I think there should also be a way to >> > configure it to not

Re: Proposal: installmedia command - A story for distributing media with apps

2008-09-16 Thread sciyoshi
On Sep 16, 7:31 pm, Brian Beck <[EMAIL PROTECTED]> wrote: > On Sep 16, 7:22 pm, Julien Phalip <[EMAIL PROTECTED]> wrote: > > > I really like the idea. However, I think there should also be a way to > > configure it to not copy to MEDIA_ROOT but to somewhere else. > > Sure - a --destination flag,

Re: Proposal: installmedia command - A story for distributing media with apps

2008-09-16 Thread Justin Lilly
Not sure if you guys are aware, but this seems a very likely candidate for django-exensions which extends manage.py like functionality. http://code.google.com/p/django-command-extensions/ -justin On Tue, Sep 16, 2008 at 7:22 PM, Julien Phalip <[EMAIL PROTECTED]> wrote: > > On Sep 17, 8:49 am,

Re: Proposal: installmedia command - A story for distributing media with apps

2008-09-16 Thread Brian Beck
On Sep 16, 7:22 pm, Julien Phalip <[EMAIL PROTECTED]> wrote: > I really like the idea. However, I think there should also be a way to > configure it to not copy to MEDIA_ROOT but to somewhere else. Sure - a --destination flag, defaulting to MEDIA_ROOT, would work. > Also, instead of just

Re: Proposal: installmedia command - A story for distributing media with apps

2008-09-16 Thread Julien Phalip
On Sep 17, 8:49 am, Brian Beck <[EMAIL PROTECTED]> wrote: > On Sep 16, 6:45 pm, Brian Beck <[EMAIL PROTECTED]> wrote: > > > Serving is totally orthogonal -- everyone is already serving up > > MEDIA_ROOT in their projects somehow anyway, and this just copies > > files to MEDIA_ROOT. > > Sorry, I

Re: Proposal: installmedia command - A story for distributing media with apps

2008-09-16 Thread Brian Beck
On Sep 16, 6:45 pm, Brian Beck <[EMAIL PROTECTED]> wrote: > Serving is totally orthogonal -- everyone is already serving up > MEDIA_ROOT in their projects somehow anyway, and this just copies > files to MEDIA_ROOT. Sorry, I guess that's not totally true -- everyone who uses more than just the

Re: Proposal: installmedia command - A story for distributing media with apps

2008-09-16 Thread Brian Beck
On Sep 16, 6:29 pm, Julien Phalip <[EMAIL PROTECTED]> wrote: > > Could it be a little smarter, and in the absence of specific apps, iterate > > over all INSTALLED_APPS, and install their media automagically? > > +1 for some sort of media.autodiscover(). > It would have to be optional though, as

Re: Proposal: installmedia command - A story for distributing media with apps

2008-09-16 Thread Julien Phalip
On Sep 17, 7:09 am, "Don Spaulding" <[EMAIL PROTECTED]> wrote: > On Tue, Sep 16, 2008 at 11:26 AM, Brian Beck <[EMAIL PROTECTED]> wrote: > > > $ python manage.py installmedia appname [appname ...] > > > The command is "dumb.".. > > Could it be a little smarter, and in the absence of specific

Re: Proposal: installmedia command - A story for distributing media with apps

2008-09-16 Thread Don Spaulding
On Tue, Sep 16, 2008 at 11:26 AM, Brian Beck <[EMAIL PROTECTED]> wrote: > > $ python manage.py installmedia appname [appname ...] > > The command is "dumb.".. Could it be a little smarter, and in the absence of specific apps, iterate over all INSTALLED_APPS, and install their media

Re: Proposal: installmedia command - A story for distributing media with apps

2008-09-16 Thread Ivan Sagalaev
Brian Beck wrote: > Distributing media with apps could be a lot easier. Currently this > requires copying or linking files manually (possibly each time the app > is updated), and this encourages developers to put CSS and JavaScript > inline in their templates. I propose a management command to

Re: Proposal: installmedia command - A story for distributing media with apps

2008-09-16 Thread Erik Allik
> I have already implemented this in our in-house django-based > framework. If interested, I can provide it. As you said, it really > does make things very simple. > Please do, I'd be interested even if it doesn't make it to the trunk. Erik --~--~-~--~~~---~--~~

Re: Proposal: installmedia command - A story for distributing media with apps

2008-09-16 Thread Rajeev J Sebastian
On Tue, Sep 16, 2008 at 9:56 PM, Brian Beck <[EMAIL PROTECTED]> wrote: > > Distributing media with apps could be a lot easier. Currently this > requires copying or linking files manually (possibly each time the app > is updated), and this encourages developers to put CSS and JavaScript > inline

Proposal: installmedia command - A story for distributing media with apps

2008-09-16 Thread Brian Beck
Distributing media with apps could be a lot easier. Currently this requires copying or linking files manually (possibly each time the app is updated), and this encourages developers to put CSS and JavaScript inline in their templates. I propose a management command to make this easier: $