List Info

Thread: template image problem




template image problem
country flaguser name
United States
2007-08-30 10:22:52
hi,

for some reason django won't load images that have a relative path on my template. How could i solve this?

thanks,
 ;
Jorge Hugo Murillo



Luggage? GPS? Comic books?
Check out fitting gifts for grads at Yahoo! Search.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Django users"; group.
To post to this group, send email to django-usersgooglegroups.com
To unsubscribe from this group, send email to django-users-unsubscribegooglegroups.com
For more options, visit this group at http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---
Re: template image problem
country flaguser name
United States
2007-08-30 10:34:56
Static content is served by http server not django.
http://www.djangoproject.com/documentation/static_files/



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "Django users" group.
To post to this group, send email to django-usersgooglegroups.com
To unsubscribe from this group, send email to
django-users-unsubscribegooglegroups.com
For more options, visit this group at htt
p://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: template image problem
user name
2007-08-30 10:55:53
> Static content is served by http server not django.
> http://www.djangoproject.com/documentation/static_files/


For development purposes, in my urls.py after defining all
my 
"business" urls, I have

from sys import argv
if 'runserver' in argv:
     urlpatterns += patterns('',
         (r'^media/(?P<path>.*)$',
             'django.views.static.serve',
             {'document_root': settings.MEDIA_ROOT}
             ),
         # a couple other debugging tools here
         )

which allows me to serve media in development, but in my 
production environment (mod_python+apache), it doesn't offer

those URL patterns because they're handled by apache alone.

-tim





--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "Django users" group.
To post to this group, send email to django-usersgooglegroups.com
To unsubscribe from this group, send email to
django-users-unsubscribegooglegroups.com
For more options, visit this group at htt
p://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---


[1-3]

about | contact  Other archives ( Real Estate discussion Medical topics )