Thursday, September 1, 2011

Re: Template image display issue

On 01-09-11 23:25, SSozuer wrote:
> Hi,
> that is my index.html template:
>
> <html>
> <body background="index.jpg">
> </body>
> </html>
>
> The index.jpg image in the same directory with template
> index.html.When i render template, it loads the template but i can't
> see image in background.
>
>
> Web server is apache2 with wsgi.

Your django urls.py probably doesn't have a url for that "index.jpg",
right? Then django doesn't know what to do with it. Just go directly to
that URL and see the error message. (First try it with "manage.py
runserver" locally).


What you need to look at: django staticfiles (included with django 1.3,
but available separate for earlier django versions).


Reinout

--
Reinout van Rees http://reinout.vanrees.org/
reinout@vanrees.org http://www.nelen-schuurmans.nl/
"If you're not sure what to do, make something. -- Paul Graham"

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

No comments:

Post a Comment