Django signals vs. custom save()-method
The more I read about Django signals (didn't set up one yet), the more I wonder where the difference between a post_save or pre_save signal and the redefinition of the save-method is.
Background Knowledge
In case you know what signals are and you know what I mean with the redefinition of the save-method, skip the following paragraphs.
Sorry, but what are signals?
Signals are actions, which you can listen to. When you, for example, want to get an email the next time someone writes a comment (commonly some spam-robot, but anyway), then you can write a small piece ...
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 ...

