At 12:03 PM 8/17/2006, Dirk wrote:

>Hi,
>
>I like that the admin/media is served in development mode by django himself.
>
>I would like to write apps which have their own media folders and 
>also should serve their media files in development mode by themselfs 
>(django himself)
>
>Can the AdminMediaHandler extended or generalized in a way that 
>other applications can tell django where to look for media files in 
>development mode ?
>
>If such a generalized MediaHandler would be available, a function 
>for catch all plugged-in media files into one 
>common-folder-structure for serving by apache.
>
>Any comments ?

[Caveat: I'm very new to Django (and web application programming for 
that matter).  I've been lurking on this list to learn.]  When I saw 
this message go by earlier today I had no idea what it was referring 
to.  Now I do.  This afternoon I got to the point where I wanted to 
use some of my own stylesheet settings.  To develop my code I've been 
using the working example of the admin code as a model.  But my naive 
approach of doing basically what the admin code/templates do failed 
miserably.  I guess this AdminMediaHandler is how the admin code is 
magically able to get its static stylesheet files served?  I did 
eventually find some pointers to the django.views.static.serve view, 
and got my stylesheets hooked up to my views, but I was left puzzled 
over why things work fine for admin without that view configured in urls.py.

Then I remembered this note go by and thought "Yeah, I think that 
enhancement would have avoided this whole period of 
confusion...woulda been nice to have today".  But I see the ticket 
has been closed as wontfix, so bummer.  I don't quite get the reason 
(I'm so new to all this that there is a lot I don't quite get, so 
that is fine).   But I thought I'd just mention the fact that I kind 
of stubbed my toe on this today.

If what works for admin can't/shouldn't/won't be generalized, then 
maybe some documentation enhancements would help out people like me. 
There is a comment at the bottom of tutorial part 3 that mentions 
setting up the static server view.  I think it would be good if that 
information was incorporated into the tutorial itself.  Also, 
mentioning the fact that the admin code has its own magic for serving 
css files that is specific to it, so when developing your own apps 
with sytlesheets you'll need to use this other thing, would be helpful.

Cheers,
Karen


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django developers" 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-developers
-~----------~----~----~----~------~----~------~--~---

Reply via email to