python-3.x - 输入 texbox 上的 V- 模型在 django for 循环中更新其他 v 模型输入文本上的文本
问题描述
我有这个 Django for 循环,我有这个带有 v 模型的输入文本框的表单。当我在它上面输入一个文本时,它会在这个 django for 循环中更新输入 texbox 上的文本:
{% for drama in theatre %}
<div class="comment-input" id="postcomment-{{tweet.id}}">
<form v-on:submit.prevent="submit0comment({{tweet.id}})" id="comment-{{tweet.id}}" >
<input id=".input_1" type="text" v-model="comment_body" class="form-control">
<div class="fonts">
<button class="btn-share">Post</button>
</div>
</form>
</div>
<br>
<div class="d-flex flex-row mb-2" v-for="comment in comments">
<img :src="comment.avatar" width="40" class="rounded-image">
<div class="d-flex flex-column ml-2">
<span class="name">[[comment.commenter]]</span>
<small class="comment-text">[[ comment.comment_body]]</small>
<div class="d-flex flex-row align-items-center status">
<small>Like</small>
<small>Reply</small>
<small>[[ comment.created_at ]]</small>
</div>
</div>
</div>
{% endfor %}
解决方案
推荐阅读
- keycloak - 在外部数据库上实现 KeyCloak 角色存储和角色映射
- python - 更改(删除列和更改多对多成员资格)FLASK 中的 SQLite 迁移后出错
- c# - 如何下载和读取 Azure Blob 容器文件
- python - SSL 错误:Python 多处理、PostgresSQL 和 Psycopg2
- spring - 如何对每个请求的特定字段进行spring bean验证
- javascript - jqplot折线图在顶部显示yaxis 0
- python - openpyxl如何将单元格格式设置为日期而不是自定义
- javascript - 我正在使用 2 个输入字段 1 用于开始日期和另一个 1 结束日期 我需要根据开始日期在日期选择器中仅显示未来 1 个月的日期
- node.js - linux VM 上的 NodeJS 托管,以及从 Windows 到 Linux 的 http 请求
- php - 从两个不同表中的相同字段名称中获取数据并检测我们指的是哪个字段名称