I have read several answeres to similar questions but didn't
understand enough.
Like others I need to use CSS external file, images and background
images. At the beginning I try to use images.
0) I use Django 1.2.5 and development web server.
1) I inserted to setting.py (there was not this parameter):
TEMPLATE_CONTEXT_PROCESSORS = (
    'django.core.context_processors.auth',
    'django.core.context_processors.debug',
    'django.core.context_processors.i18n',
    'django.core.context_processors.media',
)
2) I created subdirectories template (for templates) and media (for
images and CSS external files) in the project directory<
3) I changed in settings.py:
MEDIA_URL = '/media/'
MEDIA_ROOT = (os.path.join(os.path.dirname(__file__),'/
media/').replace('\\','/'),)
4) my index.html includes:
#
#title h1    { background:{{ MEDIA_URL }}/galion.gif left top no-
repeat; padding-left:80%; }
#
<p><img src="{{ MEDIA_URL }}jungle_hotel_dubai.gif" class="image-
pointer" alt=""></p>
5) 4) views.py:
from django.template import loader, Context
from django.shortcuts import render_to_response

def index(request):
    return
render_to_response('index.html',,context_instance=RequestContext(request))

Such version lead to an error message: SyntaxError at/index/ , invalid
syntax (views.py, line 5)
What are my mistakes please?

-- 
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.

Reply via email to