Table of Contents: Django Template Filter
I always loved being able to link back a certain chapter of a webpage. Sometimes it is great to just link to the source code of a weblog entry or any other part of it. To enable the visitors of my weblog to do that I wanted to set up some kind of Table of Contents.
I wanted it to be flexible, so that I can adjust whether the table of contents is shown or not. This makes sense, because some articles have just two headlines and a table of contents with two points looks pathetic. So the users would ...
Adding archives information via Django templatetag
It is quite typical for Wordpress-blogs to have all archives in the sidebar. For example "August 2005, September 2005", all linked back to the archives pages. Django, sadly, doesn't have something by default to generate these archive links dynamically.
There is another reason, why people, should want this ability, even though they don't want these links in their sidebar: the <link rel="archives" />-tags. In case you're not interested in this HTML-tag, just ignore the following paragraphs and skip directly to the source code.
<link rel="archives" />-HTML-Tag
I love one special little HTML-Tag, which isn ...
Markdown with syntax highlighting in Django
These days I wrote my first Django project (you are currently browsing it). Of course I wanted to post entries into this blog with code snippets. To make the reading experiance better for my readers I decided to use a syntax highlighter. You find thousands of them around the WWW.
The first try: syntaxhighlighter with tiny_mce
I decided to use syntaxhighlighter, which is purly JavaScript-based, so I didn't need to anything. (I was glad, because I was, and still am a Django and Python newbee.) The only thing I had to do was to use either of this to ...
Breadcrumbs in Django with Templates
One great feature of a well-structured website is the navigation bar or location bar, better known as breadcrumbs. It always tells the user, where exactly s/he is currently on the website. (On the website you are currently browsing it is located above the footer, called 'Your way'.)
As a matter of fact, this bar never was easy to create. But when you use Django you don't need one single line of code to achieve your own breadcrumb navigation bar.
A Good Template Structure is the Key
Like everything in Django, you have to consider before you do something ...

