0
在我的看法我已經指出我的代碼login.html>但就緒函數或內容,以便f的身體沒有在UI上看到的警報。我在這裏做錯了什麼django模板內容沒有顯示
{% extends "base/base.html" %}
<script>
$(document).ready(function() {
alert('1');
});
</script>
some code here
some code here
some code here
some code here
some code here
some code here
<b>{{response_dict.yes}} testing and testing and testinf</b>
<b>{{a}}</b>
<form action="/logon/" method="post" name="myform">
{% csrf_token %}
<b>Username</b><input type="text" name="username" id="username"></input>
<br><b>Password</b><input type="password" name="password" id="password"></input>
<b></b><input type="submit" value="Submit"></input>
<img src="/media/img/hi.png" alt="Hi!" /> <!-- This is working dude -->
<img alt="Hi!" src="/opt/labs/lab_site/media/img/hi.png">
</form>
我沒有understand..So我是猜想把你的代碼放在base.html中。什麼把這個html包含在login.html中的同一個塊中? – Rajeev 2012-07-16 09:24:31
我應該在login.html頁面做什麼? – Rajeev 2012-07-16 09:26:58
查看已更新的回答 – Tisho 2012-07-16 09:35:30