Getting Images to display in Development Environment

8 views
Skip to first unread message

Vincent

unread,
Nov 18, 2007, 12:02:22 PM11/18/07
to Django developers
I am new to Django and Python and trying to learn by going thru an
open source application called Vection. I get everything up and
running except for the static images. I followed the article at
http://www.djangoproject.com/documentation/static_files/ put I still
can't get the images to serve. Could you tell what I am doing wrong?

Enivornment:
Windows using the django web server

Application:
Absolute Path: C:\development\Vection
Code: C:\Development\Vection\vection_01

Image location: C:\Development\vection\media\

Settings.py:
(I have two, one in C:\Development\vection\ and C:\Development\vection
\vection_01 both match)
MEDIA_ROOT = 'C:/Development/vection/media/'

# URL that handles the media served from MEDIA_ROOT.
# Example: "http://media.lawrence.com"
MEDIA_URL = '/media/'

URLs.py:
#Dev Media Server
(r'^media/(?P<path>.*)$', 'django.views.static.serve',
{'document_root': 'C:\Development\Vection\media', 'show_indexes':
True}),


URL: http://127.0.01:8000/vection/login/
Image: http://127.0.01:8000/media/images/login/login_tmp_r1_c1.png
(physcial loc: C:\Development\Vection\media\images\login\
login_tmp_r1_c1.png

Thanks for your help!

Don Spaulding

unread,
Nov 21, 2007, 2:11:40 AM11/21/07
to Vincent, django-d...@googlegroups.com
Vincent, it doesn't appear anyone responded to your query here. The
reason is that this list is actually for the development of django
itself. For questions that relate to the use of django, such as this,
use the django-users list instead. Take this question there or pop
into the irc channel (#python on irc.freenode.net) to get the help
you're looking for, if indeed you're still stuck.

Don Spaulding


On Nov 18, 11:02 am, Vincent <Vincent.Zaff...@gmail.com> wrote:
> I am new to Django and Python and trying to learn by going thru an
> open source application called Vection. I get everything up and
> running except for the static images. I followed the article athttp://www.djangoproject.com/documentation/static_files/put I still

Collin Grady

unread,
Nov 21, 2007, 3:23:14 PM11/21/07
to django-d...@googlegroups.com
Don Spaulding said the following:

> into the irc channel (#python on irc.freenode.net) to get the help

I think you mean #django on irc.freenode.net :)

--
Collin Grady

Don Spaulding II

unread,
Nov 21, 2007, 8:02:49 PM11/21/07
to django-d...@googlegroups.com
No, I meant #python, because you're almost always in #django.  :-P

Good catch.

Don Spaulding
Reply all
Reply to author
Forward
0 new messages