Snippet List
I couldn't find any code for a blog-style "Read more after the jump," so I made a custom filter. It will look for **<!--more-->** for the jump, like in Wordpress.
In **settings.py** set **READ_MORE_TEXT** to what you want the text of the link to be.
`READ_MORE_TEXT = 'Read more after the jump.'`
When you call the filter in your template, pass it the absolute link of that entry. Of course, you have to have your **get_absolute_url** function defined in your model, but you should have that already, right? :P
In this example **entry.body** is the content of the blog entry.
`{% load blog_filters %}`
`{{ entry.body|read_more:entry.get_absolute_url }}`
If anyone has a better way to do this, it is, of course, welcome.
- template
- filter
- blog
- find
- jump
- read
- more
Detect blog platform.
As we all known, there are so many blog platform in the wild, e.g. Blogger.com, WordPress, LiveJournal, Movable Type etc.
This little snippet could guess the blog platform according a url.
Dependency:
1. pycurl
2. BeautifulSoup
- detect
- blog
- type
- platform
3 snippets posted so far.