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