Re: Cannot display images - need help with settings for development environment

2009-08-22 Thread robinne

I figured it out:

#MEDIA_URL = 'http://localhost:8000/testproject/site_media/'

MEDIA_URL = '/site_media/'

On Aug 22, 8:57 am, robinne  wrote:
> I'm new to Django and I cannot seem to get all the settings correct to
> allow me to view images in the development environment. Here is what I
> know (I'm developing on Vista):
>
> For internal server to serve images, you have to configure django
> settings, so here is what I've done.
> [My actual path to images is: c:\django\testproject\petinfostore
> \myimages]
> [The URL I want to use ishttp://localhost:8000/testproject/site_media/
>
> My Settings are:
>
> MEDIA_URL = 'http://localhost:8000/testproject/site_media/'
> MEDIA_ROOT = 'c:/django/testproject/petinfostore/myimages' (I've also
> tried backslashes)
>
> INSTALLED_APPS = (
>    ...
>     'django.views.static',
> )
>
> urlpatterns includes:
>  (r'^site_media/(?P.*)$', 'django.views.static.serve',
>     {'document_root': 'c:/django/testproject/petinfostore/myimages'}),
>
> When my page displays, the url to the image that is supposed to
> display is:
> 
>
> Any help is appreciated. Thanks.
--~--~-~--~~~---~--~~
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 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Cannot display images - need help with settings for development environment

2009-08-22 Thread robinne

I'm new to Django and I cannot seem to get all the settings correct to
allow me to view images in the development environment. Here is what I
know (I'm developing on Vista):

For internal server to serve images, you have to configure django
settings, so here is what I've done.
[My actual path to images is: c:\django\testproject\petinfostore
\myimages]
[The URL I want to use is http://localhost:8000/testproject/site_media/

My Settings are:

MEDIA_URL = 'http://localhost:8000/testproject/site_media/'
MEDIA_ROOT = 'c:/django/testproject/petinfostore/myimages' (I've also
tried backslashes)

INSTALLED_APPS = (
   ...
'django.views.static',
)

urlpatterns includes:
 (r'^site_media/(?P.*)$', 'django.views.static.serve',
{'document_root': 'c:/django/testproject/petinfostore/myimages'}),

When my page displays, the url to the image that is supposed to
display is:


Any help is appreciated. Thanks.

--~--~-~--~~~---~--~~
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 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---