In my last post I introduced extended-markup, which is the light-weight markup system used to generate posts in Django-Techblog. I'll cover a few other things it can do in this post.
When the Post model is saved to the database, the extended markup is parsed in to a structure that is basically a dictionary containing a list of chunks, and associated variables. The order that the chunks appear in each section is the same as the order they appear in the markup, unless a chunk variable called priority
is defined. This causes the chunks to be sorted in descending order of priority, chunks without a priority value are assigned a default of 100.
Here is an example of two chunks with a priority value assigned: continue reading…