On Feb 15, 10:16 am, Praveen Krishna R <rpraveenkris...@gmail.com> wrote: > *plz Check django official docs to find out how static files are served on > production and development server.* > * > * > *in the dev server include a similiar snippet into your projects > urls.py, urlpatterns:* > * > * > *(r'^site_media/(?P<path>.*)$', > 'django.views.static.serve',{'document_root': > 'D:/djangoprojects/praveensprofile/templates/static'}),* > * > * > ***and in the templates something similar to the below text.* > *<link href="/site_media/default.css" rel="stylesheet" type="text/css" /> > * > * > * > * > * > On Tue, Feb 15, 2011 at 1:07 PM, Szabo, Patrick (LNG-VIE) < > > > > patrick.sz...@lexisnexis.at> wrote: > > How do i check the logs !? > > I'm using the integrated webserver. > > > Kind regards > > > . . . . . . . . . . . . . . . . . . . . . . . . . . > > Patrick Szabo > > XSLT-Entwickler > > LexisNexis > > Marxergasse 25, 1030 Wien > > > mailto:patrick.sz...@lexisnexis.at > > Tel.: +43 (1) 534 52 - 1573 > > Fax: +43 (1) 534 52 - 146 > > > -----Ursprüngliche Nachricht----- > > > Von: django-users@googlegroups.com [mailto:django-users@googlegroups.com] > > Im Auftrag von Kenneth Gonsalves > > Gesendet: Dienstag, 15. Februar 2011 11:05 > > An: django-users@googlegroups.com > > Betreff: Re: images > > > On Tue, 2011-02-15 at 11:00 +0100, Szabo, Patrick (LNG-VIE) wrote: > > > Unfortunately i only get the "alt text" shown and not the image. > > > The image is in the same directory as the template. > > > check your logs to see where it is searching for your image > > -- > > regards > > KG > >http://lawgon.livejournal.com > > Coimbatore LUG rox > >http://ilugcbe.techstud.org/ > > > -- > > 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. > > > -- > > 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. > > -- > Thanks and Regards, > *Praveen Krishna R*
Just to slightly expand on what Praveen said. Static files are served differently from templates. Templates are loaded from views using a configured template path. Static files are served by your web server according to its configuration. If you are using the development web server then you need to configure Django as Praveen suggests to set the media path. if you are serving any other static content then you have already done this. As and when you move to a production web server, you will need to configure that appropriately. You should be able to leave the links unchanged (unless you do something daft) and just configure the web server correctly. Cheers, Ian -- 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.