Hi,everyone.I have had a strange problem on my homework .I load "index.html" template,which extends "base.html" template,in views,then access it through firefox and firebug show that the <head> markup seems to be broke.However,if loading "base.html" directly instead of "index.html" in views,it works right.My English is not good and I can't sure if you are able to understand ,so,they are my project files (including "views.py","template/base.html","template/index.html") following and you can test it if you like. Thank you.
######[views.py]######## #-*- coding: utf-8 -*- from django.template import RequestContext from django.shortcuts import render_to_response from django.http import HttpResponse from django.template.loader import get_template import copy import time BaseDic={ 'NowTime':time.asctime(), } def index(request): dic = copy.deepcopy(BaseDic) dic = RequestContext(request,dic) return render_to_response('index.html',dic) #######[file end]########### <!-- templates/index.html --> {% extends "base.html"%} <!-- file end --> <!-- templates/base.html --> <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <script src="{{ STATIC_URL }}js/tools.js"></script> <script src="{{ STATIC_URL }}js/base.js"></script> {% block HEAD %}<title>PQP Interview System</title>{% endblock %} </head> <body> <h1>This is BODY</h1> </body> </html> <!-- file end --> -- 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.