Re: Deprecating ADMIN_MEDIA_PREFIX

2010-11-25 Thread hejsan
In the future, how would we specify a different path for admin media?

There is the case of the "same origin policy" that makes me jump
through hoops to make sure that any javascript and/or iframe based
goodies, such as tinymce are served from the same domain.


On Nov 21, 9:23 pm, Andrew Godwin <and...@aeracode.org> wrote:
> On 21/11/10 02:52, Carl Meyer wrote:
>
>
>
>
>
>
>
>
>
> > Hi all,
>
> > The special-cased handling of contrib.admin static assets in Django
> > core is a long-time wart. Fortunately, the new static assets standard
> > introduced by contrib.staticfiles and the STATIC_URL and STATIC_ROOT
> > settings finally allows us to begin a migration path to remove this
> > wart. AdminMediaHandler is already on a deprecation path; the
> > remaining piece is the ADMIN_MEDIA_PREFIX setting.
>
> > After discussion with Jannis on IRC, we have a plan for deprecating
> > ADMIN_MEDIA_PREFIX. The expectation is now that any apps' static
> > assets should be found at STATIC_URL/appname. The idea is to introduce
> > a check whether ADMIN_MEDIA_PREFIX is equal to STATIC_URL/admin, and
> > if it is not, raise a (pending) deprecation warning and alert the user
> > that in a future release of Django, the ADMIN_MEDIA_PREFIX setting
> > will be removed, and the admin media will be assumed to be served at
> > STATIC_URL/admin.
>
> > Any objections to this plan before I put it into action?
>
> > Carl
>
> +1 from me; sounds like a good plan. The whole
> admin-media-special-case-thing has been a bit of a wart from the start.
>
> Andrew

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-develop...@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.



Re: Deprecating ADMIN_MEDIA_PREFIX

2010-11-21 Thread Andrew Godwin
On 21/11/10 02:52, Carl Meyer wrote:
> Hi all,
>
> The special-cased handling of contrib.admin static assets in Django
> core is a long-time wart. Fortunately, the new static assets standard
> introduced by contrib.staticfiles and the STATIC_URL and STATIC_ROOT
> settings finally allows us to begin a migration path to remove this
> wart. AdminMediaHandler is already on a deprecation path; the
> remaining piece is the ADMIN_MEDIA_PREFIX setting.
>
> After discussion with Jannis on IRC, we have a plan for deprecating
> ADMIN_MEDIA_PREFIX. The expectation is now that any apps' static
> assets should be found at STATIC_URL/appname. The idea is to introduce
> a check whether ADMIN_MEDIA_PREFIX is equal to STATIC_URL/admin, and
> if it is not, raise a (pending) deprecation warning and alert the user
> that in a future release of Django, the ADMIN_MEDIA_PREFIX setting
> will be removed, and the admin media will be assumed to be served at
> STATIC_URL/admin.
>
> Any objections to this plan before I put it into action?
>
> Carl
>

+1 from me; sounds like a good plan. The whole
admin-media-special-case-thing has been a bit of a wart from the start.

Andrew

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-develop...@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.



Re: Deprecating ADMIN_MEDIA_PREFIX

2010-11-20 Thread Russell Keith-Magee

On 21/11/2010, at 10:52 AM, Carl Meyer <carl.j.me...@gmail.com> wrote:

> Hi all,
> 
> The special-cased handling of contrib.admin static assets in Django
> core is a long-time wart. Fortunately, the new static assets standard
> introduced by contrib.staticfiles and the STATIC_URL and STATIC_ROOT
> settings finally allows us to begin a migration path to remove this
> wart. AdminMediaHandler is already on a deprecation path; the
> remaining piece is the ADMIN_MEDIA_PREFIX setting.
> 
> After discussion with Jannis on IRC, we have a plan for deprecating
> ADMIN_MEDIA_PREFIX. The expectation is now that any apps' static
> assets should be found at STATIC_URL/appname. The idea is to introduce
> a check whether ADMIN_MEDIA_PREFIX is equal to STATIC_URL/admin, and
> if it is not, raise a (pending) deprecation warning and alert the user
> that in a future release of Django, the ADMIN_MEDIA_PREFIX setting
> will be removed, and the admin media will be assumed to be served at
> STATIC_URL/admin.
> 
> Any objections to this plan before I put it into action?

No objections from me. Removing the special case of Admin media is a natural 
thing to do now that we have a media handling framework.

The only kink in the plan that I can see is the loss of flexibility in being 
able to deploy admin media anywhere you want, independent of other site media. 
However, I don't think this is a loss that should concern us.

Yours,
Russ Magee %-)

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-develop...@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.



Deprecating ADMIN_MEDIA_PREFIX

2010-11-20 Thread Carl Meyer
Hi all,

The special-cased handling of contrib.admin static assets in Django
core is a long-time wart. Fortunately, the new static assets standard
introduced by contrib.staticfiles and the STATIC_URL and STATIC_ROOT
settings finally allows us to begin a migration path to remove this
wart. AdminMediaHandler is already on a deprecation path; the
remaining piece is the ADMIN_MEDIA_PREFIX setting.

After discussion with Jannis on IRC, we have a plan for deprecating
ADMIN_MEDIA_PREFIX. The expectation is now that any apps' static
assets should be found at STATIC_URL/appname. The idea is to introduce
a check whether ADMIN_MEDIA_PREFIX is equal to STATIC_URL/admin, and
if it is not, raise a (pending) deprecation warning and alert the user
that in a future release of Django, the ADMIN_MEDIA_PREFIX setting
will be removed, and the admin media will be assumed to be served at
STATIC_URL/admin.

Any objections to this plan before I put it into action?

Carl

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-develop...@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.