Python
Java
PHP
IOS
Android
Nodejs
JavaScript
Html5
Windows
Ubuntu
Linux
如何在 Django 中覆盖外部应用程序模板?
我尝试覆盖django recaptcha模板没有任何运气 我究竟做错了什么 我知道在 Django 中覆盖外部应用程序的模板 https stackoverflow com questions 17918839 override temp
django
djangotemplates
djangorecaptcha
在 Django 模型中存储和转义 Django 标签和过滤器
我将模型中的内容输出到模板 但是某些模型字段调用存储在其他模型中的数据 这种情况只发生在少数领域 我想知道是否使用if与在模型中存储 django 标签相比 使用 django 标签来评估这一点会更有效 答复这个问题 https stack
python
django
djangotemplates
Django 模板扩展和 CSS
我有这样的基本模板 当我刷新页面时 此文本会记录在日志中 01 Dec 2011 18 22 00 GET search HTTP 1 1 200 2760 01 Dec 2011 18 22 00 GET static style css
python
django
djangotemplates
如何开始构建 django 网站以及 django 如何构建页面?
我为我的个人网站启动了一个 django 项目来学习 django 到目前为止 我已经设置了我需要的一切开发环境并遵循this https docs djangoproject com en dev intro tutorial01 创建一
django
djangotemplates
djangoviews
如何循环表单字段选择并显示关联的模型实例字段
我有一个带有多项选择字段的 ModelForm 这些选择是属于特定俱乐部的徒步旅行者的填充实例 我想自定义表单的显示方式 方法是在表格中显示选项 其中第一列包含复选框 另外几列显示每个徒步旅行者的详细信息 例如 列是 复选框 姓名 年龄 最
python
django
djangomodels
djangoforms
djangotemplates
如何在不破坏标签的情况下截断html?
如何确保所有 html 标签都已关闭 出现问题是因为我想为每篇文章创建某种摘录 例如有人写了这样一篇文章 Hi everyone I m just an article and I have few strong tags strong i
python
html
django
djangotemplates
djangotemplatefilters
在 django 中使用 Context 时如何禁用 HTML 编码
在我的 django 应用程序中 我使用模板来构建电子邮件正文 其中一个参数是 url 请注意 url 中有两个参数以 分隔 t loader get template sometemplate c Context foo bar url
python
django
djangotemplates
Django simple_tag 和设置上下文变量
我正在尝试使用 simple tag 并设置上下文变量 我使用的是 django 的 trunk 版本 from django import template register simple tag takes context True d
python
django
djangotemplates
templatetags
djangocontext
如何正确缩进 Django 模板
我在 SublimeText 3 中工作 在编写 Django 模板时 我混合了 html 和函数 我喜欢缩进我的代码 以便block if和其他此类声明均缩进 例如 手动格式化 extends accounts base html blo
django
djangotemplates
sublimetext3
如何在没有 Django 其余部分的情况下使用 Django 模板?
我想在我的 Python 代码中使用 Django 模板引擎 但我没有构建基于 Django 的网站 如果没有 settings py 文件 和其他文件 并且必须设置 DJANGO SETTINGS MODULE 环境变量 如何使用它 如果
python
django
templates
djangotemplates
templateengine
如何将一个模板插入到另一个模板中?
我有一个非常基本的模板 basic template html 并且想要填充使用另一个部分模板格式化的数据 basic template html 可能包含使用部分模板格式化的一些内容 我应该如何构建views py中的代码 我这样做的原因
html
django
djangotemplates
在 if 条件内调用块:django 模板
我一直在尝试在 django 模板中调用 if 条件内的块 我有一个base template 我有许多其他模板可以扩展基本模板 我在基本模板中定义了一个块 block test block Test endblock 然后我想在其他模板中
django
djangotemplates
如何进行复杂的查询? | ChartJS 和 Django
我使用下面的 Chart JS 库创建了一个图表 我的 models py 下面 class Organization models Model name models CharField max length 250 unique Tru
django
djangomodels
djangoviews
djangotemplates
chartjs
如何在 Django 模板上下文中获取“调试”变量?
根据这个SO帖子 如何检查 django 模板中的 TEMPLATE DEBUG 标志 https stackoverflow com questions 1271631 how to check the template debug fl
python
django
djangotemplates
在内存中调用 Django 模板渲染器而不需要字符串中的任何文件?
我为我的用户构建了一种基于 Django 模板语言的宏语言 用户在 UITextFields 中输入可以在较大文档的上下文中呈现的模板 宏片段 因此 我有 django 模板代码的大型多行字符串片段 这些片段应该填充也存储在内存中的变量 我
python
django
djangotemplates
无法在 django 模板中使用 unicode 字符串
我在 django 模板中使用了 B M N TO N 字符串 它引发了错误 utf8 编解码器无法解码位置 569 中的字节 0xd4 无效的连续字节 但是当我使用 BO MON TOAN 字符串时 它不会引发错误 所以 我在模板中使用了
python
django
python27
djangotemplates
为什么 Django blocktrans 在一个地方工作而不是在另一个地方工作?
我有两个 Django 模板 在 Pinax 0 9 x 项目中 其中的文本blocktrans堵塞 一个正在工作 另一个则没有 正在工作的看起来像 extends site base html block body h1 ABC h1 h
python
django
djangotemplates
pinax
Django 多重注释减慢查询速度
我一直在调试django debug toolbar 如果我在查询中使用多个注释 那么 Django 会花费大量时间来获取查询结果 class Project First models Model project first results
django搜索页面未找到错误
我陷入了困境 我应该能够在页面上输入搜索查询 并且 django 应该返回匹配页面的列表 如果有 但它没有向我显示任何页面 即使它在那里 并且给了我一个错误 假设我有一页内容为一 当我搜索时 我收到此错误 找不到页面 404 请求方式 GE
django
djangotemplates
djangoviews
如何重定向消息以在 Django 模板中显示它们?
我有一个验证并保存表单的视图 保存表单后 我想重定向回 l ist object 视图 并显示成功消息 客户 xyz 的表单已成功更新 HttpResponseRedirect 似乎不起作用 因为它只有一个 url 参数 无法传递字典 我尝
python
django
redirect
djangotemplates
«
1 ...
3
4
5
6
7
8
9
...20
»