Reconsider ADMIN_MEDIA_PREFIX default?
http://code.djangoproject.com/ticket/2891 was marked as a wontfix by jacob after "discussion with Malcolm". Neither Collin or myself (or several others on IRC) can see a reason why that this would cause any big disruption. Mr Trier even mentions it on his blog today as an example of a silly default :P http://blog.michaeltrier.com/2007/12/18/a-kinder-gentler-django --~--~-~--~~~---~--~~ 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: Reconsider ADMIN_MEDIA_PREFIX default?
>12/01/07 18:58:39 changed by jacob ¶ >* status changed from new to closed. >* resolution set to wontfix. >OK, Malcolm and I have discussed this IRL and decided that this ticket will just break too many people's code. We should instead change the documentation to not suggest that people set MEDIA_URL to "/media/" also. Unfortunately, not the first time I see that you guys wrong understand your users and their code :( I can explain this only with that you have some coding practices not shared with anyone :\ The number of django applications will grow in many times in future, please consider that. So I don't think you did the right decision keeping a wart when it's still easy to remove it completely. However I think you could easily name few more such obvious, important, but backwards incompatible changes. How do you like the idea to perform all such changes _at_once_ in one of 1.0betas? On Dec 18, 2007 3:12 PM, SmileyChris <[EMAIL PROTECTED]> wrote: > > http://code.djangoproject.com/ticket/2891 was marked as a wontfix by > jacob after "discussion with Malcolm". > > Neither Collin or myself (or several others on IRC) can see a reason > why that this would cause any big disruption. > > Mr Trier even mentions it on his blog today as an example of a silly > default :P > http://blog.michaeltrier.com/2007/12/18/a-kinder-gentler-django > > > -- Best regards, Yuri V. Baburov, ICQ# 99934676, Skype: yuri.baburov, MSN: [EMAIL PROTECTED] --~--~-~--~~~---~--~~ 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: Reconsider ADMIN_MEDIA_PREFIX default?
On 12/18/07, Yuri Baburov <[EMAIL PROTECTED]> wrote: > Unfortunately, not the first time I see that you guys wrong understand > your users and their code :( I'm sorry; I stopped reading at this point. If you'd like to try your argument again, leave off the ad hominem attacks next time. Jacob --~--~-~--~~~---~--~~ 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: Reconsider ADMIN_MEDIA_PREFIX default?
The default setting for ADMIN_MEDIA is /media/. The doc on serving static media (under the "big, fat disclaimer") suggests using / site_media/ for other (non-admin) media. The doc on mod_python deployment suggests using /media/ for media in general, and mentions that under the development server, admin media is automagically served up (in the default case) from its location in django/contrib/admin/ media/. (This is in fact done in django/core/management/commands/ runserver.py, in function inner_run()). So we have some options, such as the following examples: 1. Use /media/ for site media in general and /admin_media/ for admin media. This certainly seems natural, it's what the ticket, The OP and Michael Trier's blog entry are suggesting. To some (including me), no strong reason was given for the wontfix - given that there are bigger backwards-incompatible changes around. 2. Use /media/ for admin media and e.g. /site_media/ for media. This seems less intuitive - a bit like the tail wagging the dog. However, it's not unreasonable to suppose that many user apps, some of them intended for "drop in" usage, will have static media; so there ought to be a convention (TOOWTDI) about how media URLs are organised. A reasonable approach would be that the media root for any app is conventionally /media/app_label. This is easily organisable under Apache/mod_python by having a single media location /media/ for which you do a "SetHandler None", then create a "media" directory in the Apache document root, and in that directory create symbolic links to app_label1 -> /path/to/media/for/app/with/label/app_label1, etc. This convention leads to a default of /media/admin/ for ADMIN_MEDIA_PREFIX, and /document_root/media/admin being symlinked to the location of the Django admin media. This way, the admin app is consistent with all other apps. After all, isn't it true that the admin is just another Django app, albeit a very very useful one? It'd be a good change to make before the 1.0 release, IMO. If y'all agree it's a reasonable idea, the docs could be updated to suggest/recommend this convention explicitly. Have I missed anything? I'm sure I can count on you to set me right. Just my $0.02, Vinay Sajip --~--~-~--~~~---~--~~ 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: Reconsider ADMIN_MEDIA_PREFIX default?
On Dec 18, 5:37 pm, Vinay Sajip <[EMAIL PROTECTED]> wrote: > The default setting for ADMIN_MEDIA is /media/. The doc on serving Whoops, I meant ADMIN_MEDIA_PREFIX. Sorry. --~--~-~--~~~---~--~~ 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: Reconsider ADMIN_MEDIA_PREFIX default?
On Dec 18, 6:01 pm, "Rob Hudson" <[EMAIL PROTECTED]> wrote: > On 12/18/07, Vinay Sajip <[EMAIL PROTECTED]> wrote: > > > A reasonable approach would be that the media root for any app is > > conventionally /media/app_label. This is easily organisable under > > Apache/mod_python by having a single media location /media/ for which > > you do a "SetHandler None", then create a "media" directory in the > > Apache document root, and in that directory create symbolic links to > > app_label1 -> /path/to/media/for/app/with/label/app_label1, etc. > > I like the idea but doesn't this run into the same like-named > app_label problem that the other thread is trying to solve? eg: > "ellington.search" and "marketplace.search" would both map to > /media/search/. Yes, but it's suggested as a convention, and also I'm assuming that with the pressure Jacob was talking about in his opening post of the other thread, the app_label issue will get sorted out sooner rather than later. The patch on #3591 passes all tests; I can't see why it can't be eased in soon, even if the core devs want to make some mods to it. The way things are now, other stuff (for example, table prefixes) breaks because of the 'ellington.search'/'marketplace.search' clash, unless explicit action is taken. The same problem affects template search order too, of course - requiring renaming, careful ordering of INSTALLED_APPS/ TEMPLATE_DIRS and other stuff of the kind we could all do without. --~--~-~--~~~---~--~~ 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: Reconsider ADMIN_MEDIA_PREFIX default?
On 12/18/07, Vinay Sajip <[EMAIL PROTECTED]> wrote: > A reasonable approach would be that the media root for any app is > conventionally /media/app_label. This is easily organisable under > Apache/mod_python by having a single media location /media/ for which > you do a "SetHandler None", then create a "media" directory in the > Apache document root, and in that directory create symbolic links to > app_label1 -> /path/to/media/for/app/with/label/app_label1, etc. I like the idea but doesn't this run into the same like-named app_label problem that the other thread is trying to solve? eg: "ellington.search" and "marketplace.search" would both map to /media/search/. -Rob --~--~-~--~~~---~--~~ 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: Reconsider ADMIN_MEDIA_PREFIX default?
np ;) >12/01/07 18:58:39 changed by jacob ¶ >* status changed from new to closed. >* resolution set to wontfix. >OK, Malcolm and I have discussed this IRL and decided that this ticket will just break too many people's code. We should instead change the documentation to not suggest that people set MEDIA_URL to "/media/" also. [...skipped for Jacob personally. he have read it already...] I can explain your actions only with that you have some coding practices not shared with anyone :\ The number of django applications will grow in many times in future, please consider that. So I don't think you did the right decision keeping a wart when it's still easy to remove it completely. However I think you could easily name few more such obvious, important, but backwards incompatible changes. How do you like the idea to perform all such changes _at_once_ in one of 1.0betas? On Dec 18, 2007 8:57 PM, Jacob Kaplan-Moss <[EMAIL PROTECTED]> wrote: > > On 12/18/07, Yuri Baburov <[EMAIL PROTECTED]> wrote: > > Unfortunately, not the first time I see that you guys wrong understand > > your users and their code :( > > I'm sorry; I stopped reading at this point. If you'd like to try your > argument again, leave off the ad hominem attacks next time. > > Jacob -- Best regards, Yuri V. Baburov, ICQ# 99934676, Skype: yuri.baburov, MSN: [EMAIL PROTECTED] --~--~-~--~~~---~--~~ 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: Reconsider ADMIN_MEDIA_PREFIX default?
> http://code.djangoproject.com/ticket/2891 was marked as a wontfix by > jacob after "discussion with Malcolm". > > Neither Collin or myself (or several others on IRC) can see a reason > why that this would cause any big disruption. > > Mr Trier even mentions it on his blog today as an example of a silly > default :P > http://blog.michaeltrier.com/2007/12/18/a-kinder-gentler-django Sure blame me. :) I had not seen that ticket when I wrote the post, but I think it's a very good solution. Although I appreciate all the thought that Vinay Sajip put into it, I think the solution he proposes is over-engineered for this situation. The ticket addresses the problem well and causes the least amount of impact. Michael Trier blog.michaeltrier.com --~--~-~--~~~---~--~~ 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: Reconsider ADMIN_MEDIA_PREFIX default?
On Tue, 2007-12-18 at 01:12 -0800, SmileyChris wrote: > http://code.djangoproject.com/ticket/2891 was marked as a wontfix by > jacob after "discussion with Malcolm". > > Neither Collin or myself (or several others on IRC) can see a reason > why that this would cause any big disruption. How did you conduct the survey where you established this? Keep in mind that neither #django, django-dev nor django-users is necessarily representative of the people running Django applications in the wild. So I think you'll need to supply some details here. :-) Anybody who has only put things they *change* in their config file (hardly a revolutionary concept, given how much people go on and on about DRY here) will have their site broken by this change. It's a bit tricky to make it break in a destructive way, which is what we try very hard to do for backwards incompatible changes. Given that trade-off: no changes mean no breakages, a change means a subtle, possibly tricky to diagnose breakage for something that really isn't that big a deal. I'm basically -0 on the change (maybe a bit more than that) and since it's not mountain-out-of-molehills month, I figure we can live with things as they are and not imposing unnecessary breakage on our userbase. Everybody seems to want to use the arguments that "nobody will have removed that" (which I find quite false) and "we've broken things before" (when we had to and, whenever possible, in destructive ways so that people noticed). I don't see those applying particularly strongly in favour of this change. Malcolm -- Two wrongs are only the beginning. http://www.pointy-stick.com/blog/ --~--~-~--~~~---~--~~ 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: Reconsider ADMIN_MEDIA_PREFIX default?
Malcolm Tredinnick said the following: > I'm basically -0 on the change (maybe a bit more than that) and since > it's not mountain-out-of-molehills month, I figure we can live with > things as they are and not imposing unnecessary breakage on our > userbase. With respect, I think it should be necessary. Using poor defaults that cause problems when people try to use the common sense path for media mapping is worse than a one time tiny change that requires the rare person to add one more setting. Seeing as how 'django-admin.py startproject' creates a default settings.py template that includes a value for ADMIN_MEDIA_PREFIX, I think you're overestimating how many people would actually be impacted, since I think most of them would be using a file based on that :) -- Collin Grady In space, no one can hear you fart. --~--~-~--~~~---~--~~ 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: Reconsider ADMIN_MEDIA_PREFIX default?
On Dec 19, 1:39 am, Empty <[EMAIL PROTECTED]> wrote: > I had not seen that ticket when I wrote the post, but I think it's a > very good solution. Although I appreciate all the thought that Vinay > Sajip put into it, I think the solution he proposes is over-engineered > for this situation. The ticket addresses the problem well and causes > the least amount of impact. Over-engineered? A documentation change, plus a one-line config change? Surely not! What would be the right amount of engineering, then? Regards, Vinay Sajip --~--~-~--~~~---~--~~ 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: Reconsider ADMIN_MEDIA_PREFIX default?
On Dec 19, 2:54 am, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > On Tue, 2007-12-18 at 01:12 -0800, SmileyChris wrote: > >http://code.djangoproject.com/ticket/2891was marked as a wontfix by > > jacob after "discussion with Malcolm". > > > Neither Collin or myself (or several others on IRC) can see a reason > > why that this would cause any big disruption. > > How did you conduct the survey where you established this? Keep in mind > that neither #django, django-dev nor django-users is necessarily > representative of the people running Django applications in the wild. So > I think you'll need to supply some details here. :-) > > Anybody who has only put things they *change* in their config file > (hardly a revolutionary concept, given how much people go on and on > about DRY here) will have their site broken by this change. It's a bit > tricky to make it break in a destructive way, which is what we try very > hard to do for backwards incompatible changes. Given that trade-off: no > changes mean no breakages, a change means a subtle, possibly tricky to > diagnose breakage for something that really isn't that big a deal. > > I'm basically -0 on the change (maybe a bit more than that) and since > it's not mountain-out-of-molehills month, I figure we can live with > things as they are and not imposing unnecessary breakage on our > userbase. > Just suppose we changed only the ADMIN_MEDIA_PREFIX setting in django/ conf/project_template/settings.py to '/media/admin/', and all other changes were documentation changes. How would that break existing code? Perhaps I'm missing something obvious, but then it shouldn't take long to set me right. Regards, Vinay Sajip --~--~-~--~~~---~--~~ 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: Reconsider ADMIN_MEDIA_PREFIX default?
What I find mildly amusing is Malcolm's comment in the ticket [1] which is pretty much the opposite of what he's saying now. In his defence, he did say he would have to think about it for a bit longer ;) In any case, before I wrote the backwards-incompatible patch, I wrote one that is pretty much what vinay it talking about [2], one that only changes project_template/settings.py (there are still confusion issues with that, but at least it's a better default for newcomers). [1] http://code.djangoproject.com/ticket/2891#comment:10 [2] http://code.djangoproject.com/attachment/ticket/2891/2891.2.patch --~--~-~--~~~---~--~~ 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: Reconsider ADMIN_MEDIA_PREFIX default?
> Over-engineered? A documentation change, plus a one-line config > change? Surely not! What would be the right amount of engineering, > then? Perhaps I misunderstood your proposal. Michael Trier blog.michaeltrier.com --~--~-~--~~~---~--~~ 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: Reconsider ADMIN_MEDIA_PREFIX default?
On Dec 19, 2007 4:26 AM, SmileyChris <[EMAIL PROTECTED]> wrote: > What I find mildly amusing is Malcolm's comment in the ticket [1] > which is pretty much the opposite of what he's saying now. In his > defence, he did say he would have to think about it for a bit > longer ;) What strikes me about this is the sheer amount of effort being devoted to something that's honestly not all that important at all. If you guys want to go after Jacob and Malcolm on a design decision, couldn't you have come up with a more significant one to do it over? -- "Bureaucrat Conrad, you are technically correct -- the best kind of correct." --~--~-~--~~~---~--~~ 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: Reconsider ADMIN_MEDIA_PREFIX default?
On Dec 20, 12:41 pm, "James Bennett" <[EMAIL PROTECTED]> wrote: > On Dec 19, 2007 4:26 AM, SmileyChris <[EMAIL PROTECTED]> wrote: > > > What I find mildly amusing is Malcolm's comment in the ticket [1] > > which is pretty much the opposite of what he's saying now. In his > > defence, he did say he would have to think about it for a bit > > longer ;) > > What strikes me about this is the sheer amount of effort being devoted > to something that's honestly not all that important at all. Perhaps I was a bit subtle with that "ribbing". Oh well. --~--~-~--~~~---~--~~ 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: Reconsider ADMIN_MEDIA_PREFIX default?
Guys, this is really degenerating into a bikeshed issue. Let it rest for a while, OK? Endless "me too" comments don't add anything useful to the discussion, and there are larger and more important things to be working on right now. And if anybody feels the need to post a snarky comment about perfectionists caring about little details, I'd like to remind them that perfectionism is, in large part, about knowing how to prioritize: getting the little details right while larger problems persist is not something a "perfectionist" would accept. -- "Bureaucrat Conrad, you are technically correct -- the best kind of correct." --~--~-~--~~~---~--~~ 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: Reconsider ADMIN_MEDIA_PREFIX default?
On Dec 21, 2007 4:42 AM, Robert Šmol <[EMAIL PROTECTED]> wrote: > As my 0.02 cents of new comer I can confirm this was one of the things > that slows adoption of Django. Proposed change to have ADMIN_MEDIA_PREFIX to > be /admin_media/ (or either /media/admin/ ) makes more sense (at least for > me). When I started with django I was confused with when I used /media for > my media (as suggested in doc) just to find out my admin section is not > working properly anymore. I either copy the admin folder from django installation folder> to /media or I now change ADMIN_MEDIA_PREFIX to > be /admin_media/ and setup a static server in my urls.conf and I'm pretty > sure this not the right way anyway (it works but not out of the box). > I also had some issues with this when I first started learning Django. I remember following through the tutorials only to find that media wasn't working as I had expected. The problem was solved after visiting the IRC channel and receiving some sarcastic support from someone in there. I consider myself proficient with Django now, so this is not a problem, although one of the first things I do when I start a new Django app is change ADMIN_MEDIA_PREFIX to 'admin-media'. If this thread still means anything to the django devs, I am +1 on it. To me it seems like a minor backwards-incompatible change that would result in a more enjoyable experience for Django newcomers and it might as well be cleared up in the next major release. --~--~-~--~~~---~--~~ 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: Reconsider ADMIN_MEDIA_PREFIX default?
As my 0.02 cents of new comer I can confirm this was one of the things that slows adoption of Django. Proposed change to have ADMIN_MEDIA_PREFIX to be /admin_media/ (or either /media/admin/ ) makes more sense (at least for me). When I started with django I was confused with when I used /media for my media (as suggested in doc) just to find out my admin section is not working properly anymore. I either copy the admin folder from to /media or I now change ADMIN_MEDIA_PREFIX to be /admin_media/ and setup a static server in my urls.conf and I'm pretty sure this not the right way anyway (it works but not out of the box). Than I had to disturb people in IRC and mailing lists and I'm pretty sure a lot of newcomers do the same. And since you promote DJANGO to be easy to use you have to expect really newcomers with hardly any Apache, project folder organization, mod_python experience at all. Not gurus like you are, for whom this seems such a trivial change to not even bother with it. This is when I find Yuris comment about not understanding your users requirements to be correct and valid. Although I like Django very much I really cannot understand why there is such a lot of everyones effort wasted on such a small and clean up or cosmetic (remember django fav icon issue?) changes instead of just doing them. I use 0.96 and I'm pretty sure the SVN code is already a lot of backward incompatible right? all the best --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---