2015-03-25 19 views
-2
<!--this is my base.html file --> 
<!DOCTYPE html> 
<html lang="en"> 
<head> 
<title>Jumbotron Template for Bootstrap</title> 
</head> 
<body> 
{% block content %} {% endblock %} 
<p>&copy; Company 2014</p> 
</body> 
</html> 


<!-- this is my signup.html file--> 
{% extends "base.html" %} 
{% block title %} 

    <form method = 'POST' action = ''>{% csrf_token %} 

    <label for="your_name">Your name: </label> 
    {{form.as_p}} 
    <input type = 'submit'> 
    </form> 
{ % endblock % } 

我只是得到錯誤未封閉的標記「塊」。尋找一:端塊

「未關閉的標籤 '塊' 尋找之一:端塊」

請幫助。

回答

2

重要的是不要添加額外的空格並遵循語法。替換:

{ % endblock % } 

有:

{% endblock %} 
+0

謝謝...它已經解決了.. – user3290624 2015-03-25 12:32:04

+0

@ user3290624好,考慮接受的答案,謝謝。 – alecxe 2015-03-25 12:39:47