我最近开始从Jekyll(基于rails的框架)迁移到Django,我才刚刚起步。你知道吗
我想弄清楚_配置yml(如果有的话)会在django。对于那些没有杰基尔背景的人_配置yml看起来有点像这样:
# ----------------------- #
# Main Configs #
# ----------------------- #
markdown: rdiscount
pygments: true
permalink: /posts/:title
rdiscount:
extensions: [smart]
url: http://foo.bar
title: ./derp
subtitle: My code
author: Foo Bar
simple_search: http://google.com/search
description:
这个功能是不必写一遍又一遍的网页标题,网址等。。。你知道吗
谢谢你!你知道吗
与配置文件最相关的等效文件是设置.py. 对于URL模式,您有专用模块-网址.py. 你知道吗
像页面标题这样的东西可以在任何地方定义,只要你把它拉到模板上下文中,但我认为最好的做法是使用内置的网站应用程序或直接把它放在主模板中。你知道吗
相关问题 更多 >
编程相关推荐