#10650: Clarify use of MEDIA_ROOT in default settings.py
---------------------------------------------+------------------------------
Reporter: tvon | Owner: nobody
Status: new | Milestone: 1.2
Component: File uploads/storage | Version: 1.0
Resolution: | Keywords:
Stage: Design decision needed | Has_patch: 0
Needs_docs: 0 | Needs_tests: 0
Needs_better_patch: 0 |
---------------------------------------------+------------------------------
Comment (by thiggins):
Brian, thanks for tuning in. Your latest point is well taken. After all,
MEDIA_ROOT is just a root. It could easily have two folders under it, one
for incoming and one for outgoing media. I also see that the ongoing
process of software/documentation design has created the ''appearance'' of
a conceptual disparity between the very terse official documentation and
your blog post. I think what is desired first by the uninitiated, like
myself and perhaps vak and Muhammad Alkarouri above, is a clear path to
getting pages served, while still in the development phase, with CSS and
images intact. Your blog attempts to assist with this, and I promise to
study it again with improved insight.
I had been having a several-days-long email conversation with my CS
graduate son on the correct setup of MEDIA_ROOT. I took the point of view
that it is for all static files. He insisted that it is for uploads only,
pointing to this ticket, and saying:
"Read this ticket. Someone even mentions the blog post you linked.
http://code.djangoproject.com/ticket/10650
Notice in the blog post he makes use of MEDIA_ROOT and MEDIA_URL himself,
passing it along to static.serve. He could have called these settings
anything. He's confusing people by using settings that Django uses for
something else.
Unfortunately, Django is also at fault for being far too vague in its docs
about what MEDIA_ROOT and MEDIA_URL are used for. Searching through
Django's code confirms that MEDIA_ROOT & MEDIA_URL are used for file
upload, and that MEDIA_URL is provided as a convenience to templates via
the default context processors (available when using RequestContext?)."
Thus persuaded, I agreed with him, but now see that what we have is merely
a conceptual misunderstanding; if we users wire everything right we will
get good results even if we put MEDIA_ROOT to the additional use of
housing our served static media. STATIC_DOC_ROOT is a suggestion, and
could be under MEDIA_ROOT anyway, and perhaps that would typically be
sensible. Tidying up the ideas presented in the official documentation
would have helped speed my process along, however.
By the way, I would not personally say "Django is at fault." This is a
wonderful product in the throes of a major creative upheaval and I am very
excited about the extraordinary results I am seeing. Keep up the good
work, please!
--
Ticket URL: <http://code.djangoproject.com/ticket/10650#comment:10>
Django <http://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---