Nathan:

Thank you for your reply.

Your solution seems practical, but I found another solution. In
'settings.py' I have:

MEDIA_ROOT = './static/'
MEDIA_URL = 'static/'

and in 'urls.py' I have:

(r'^static/(?P<path>.*)$', 'django.views.static.serve',
{'document_root': 'static'}),

Then in the templates I can have:

<img src="http://localhost:8000/static/picture.png";>

Which seems to work for me, and avoids any hardcoded paths for my
tutorial.

Also, note that with your solution calling your media url 'media' will
clash with the default name for admin media, although I'm sure that
you knew that, and that you were only providing an example.

Thanks again,
cjlesh


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@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-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to