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, defaulting to MEDIA_ROOT, would work.

There's also the issue of the application knowing where its media will
be installed,
so that it can access it from templates. Let's say I just did

manage.py installmedia myapp

and all of myapp's media got copied into MEDIA_ROOT/myapp/{css,js}/.
Should I assume
in my templates that the files are available at {{ MEDIA_URL }}/myapp/
{css,js}/? Or maybe
there should be a settings variable, something like

APP_MEDIA_URLS = {
'myapp': 'some/other/path',
...
}

so that the app can use {{ APP_MEDIA_URLS.myapp }}/myapp/{css,js}/.
This doesn't seem like
a great solution though, because there's no real "standard" for which
{% blocks %} to override in
an app to add css/js; maybe this configuration step should just be
left to the person using the app.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-developers@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en
-~--~~~~--~~--~--~---



Re: #7611 contrib.auth PasswordResetTest requires specific templates for tests to pass

2008-09-06 Thread sciyoshi

On Jul 19, 2:15 am, "Russell Keith-Magee" <[EMAIL PROTECTED]>
wrote:
> On Sat, Jul 19, 2008 at 1:58 PM, Jason Yan <[EMAIL PROTECTED]> wrote:
>
> > Re:http://code.djangoproject.com/ticket/7611
>
> > I believe that we should not run these tests if we cannot find the
> > templates for the same reason we don't run Docutils tests if docutils
> > is not installed.  Though the error reported that the template is not
> > found is "correct", I don't believe it is a correct test failure
> > because that is not the goal of the test case.
>
> I disagree. Like I say in the comment for the ticket, you can't claim
> that the auth application works correctly in your project if those
> templates are not available.

Not sure if this should be considered a related issue - the auth tests
use a different urlconf that only include the auth urls, so if you
provide custom registration templates that do reverse lookups with {%
url %} for other urls in your projects, the tests fail...

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-developers@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en
-~--~~~~--~~--~--~---