2015-03-18 3 views
0

У меня есть base.html и мой footer.html в моей папке static/templates; однако, {% распространяется% 'base.html'} дает мне ошибку:Ошибка шаблона Django

Can't find settings for this Django File 

Вот мой footer.html файл:

{% extends 'base.html' %} 

{% block footer %} 
     <div class="row"> 
     <div class="small-12 column" id="footer"> 
       <div class="large-3 column" id="footer_content"> 
           <div class="social_media"> 
             <img src="/media/img/fb.png"> 
             <img src="/media/img/google+.png"> 
             <img src="/media/img/twitter.png"> 
           </div> 
           <hr></br> 
           <h4>{{ name }}: {{ slogan }}</h4> 
           <span>&copy; {{ name }} {{ year }}</span> 
         </div> 
       </div> 
     </div> 
    </div> 
{% endblock %} 

обновление отслеживающий, и я установил кронштейн, что был моим плохим.

Traceback: 
File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py" in get_response 
    111.      response = wrapped_callback(request, *callback_args, **callback_kwargs) 
File "/home/zach/Documents/project/src/dateyear/views.py" in year 
    16.        context_instance=RequestContext(request)) 
File "/usr/local/lib/python2.7/dist-packages/django/shortcuts.py" in render_to_response 
    25.  return HttpResponse(loader.render_to_string(*args, **kwargs), **httpresponse_kwargs) 
File "/usr/local/lib/python2.7/dist-packages/django/template/loader.py" in render_to_string 
    170.   t = get_template(template_name, dirs) 
File "/usr/local/lib/python2.7/dist-packages/django/template/loader.py" in get_template 
    144.  template, origin = find_template(template_name, dirs) 
File "/usr/local/lib/python2.7/dist-packages/django/template/loader.py" in find_template 
    132.    source, display_name = loader(name, dirs) 
File "/usr/local/lib/python2.7/dist-packages/django/template/loader.py" in __call__ 
    44.   return self.load_template(template_name, template_dirs) 
File "/usr/local/lib/python2.7/dist-packages/django/template/loader.py" in load_template 
    50.    template = get_template_from_string(source, origin, template_name) 
File "/usr/local/lib/python2.7/dist-packages/django/template/loader.py" in get_template_from_string 
    156.  return Template(source, origin, name) 
File "/usr/local/lib/python2.7/dist-packages/django/template/base.py" in __init__ 
    132.   self.nodelist = compile_string(template_string, origin) 
File "/usr/local/lib/python2.7/dist-packages/django/template/base.py" in compile_string 
    162.  return parser.parse() 
File "/usr/local/lib/python2.7/dist-packages/django/template/base.py" in parse 
    288.      self.invalid_block_tag(token, command, parse_until) 
File "/usr/local/lib/python2.7/dist-packages/django/template/base.py" in invalid_block_tag 
    344.   raise self.error(token, "Invalid block tag: '%s'" % command) 

Exception Type: TemplateSyntaxError at/
Exception Value: Invalid block tag: 'endblock' 
+0

Можете ли вы разместить трассировку? – vishen

+0

Да, я только что разместил его. – ZachPerkitny

+1

Возможно, вам придется опубликовать свой файл 'base.html', извините. – vishen

ответ

-1

В шаблоне, у вас есть дополнительный (Div закрывающий тег) < (/ дел)> в конце, который может быть причиной проблемы !!!

Смежные вопросы