0

I recently started moving from Jekyll (rails-based framework) to Django and I am just starting.

I am trying to figure out what the equivalent to _config.yml (if there is any) would be in django. For those with no background in Jekyll, _config.yml looks somewhat like this:

# ----------------------- #
#      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:

The function of this is not to have to write over and over the page title, urls, etc...

Thank you!

iamricard
  • 483
  • 7
  • 16

1 Answers1

0

The most relevant equivalent of your config file would be settings.py. For urls patterns you have dedicated module - urls.py.

Things like page title could be define anywhere provided you pull it into template context, but the best practice I think to use built in site app or put it directly in main template.

mariodev
  • 13,928
  • 3
  • 49
  • 61
  • Thing is in _config.yml you could have values like twitter user, g+ account and such so whenever you had to change the name of the twitter account it would only have to be change in one place. The idea would be: twitter: @foo g+: plus.google.com/foobar Then you would call it with {{ twitter }} or {{ g+ }} – iamricard Aug 30 '13 at 11:05
  • @Ricard-Sole For this case you define your own template context processors – mariodev Aug 30 '13 at 11:17