February 4, 2012

A short example using django-app-plugins

At Djangocon a couple months ago, I was intrigued to hear about Django App Plugins. This small app adds the ability to make mount points in your Django templates.

That way, you can have your apps insert text into your templates just by referencing the mountpoint in the template. This allows you to have apps which possibly aren’t central to your main application add text which you wouldn’t want to put into the default template.

Unfortunately, there is absolutely no documentation, so I spent the evening working out how to get this to work. There are tons more options than what I’ve figured out, I think a simple example is much better than no documentation at all.

[Read more...]

Technorati Tags: , , , ,

Related Posts plugin modifications

adapter Related Posts plugin modificationsI’ve been delaying using a related entries plugin because it didn’t fit with my normal way of posting. See, it uses a WordPress custom field "keywords" to do its matching. That’s OK, but I already have all my posts marked up with inline keywords, for the Technorati plugin Simpletags.

So, when I have an itch for long enough, I scratch it. So, I’ve written an extension to the related-posts plugin which reads keywords from the post text inside [tags] [/tags] markers. In other words, it leverages the use of the Simpletags plugin. You can see it in action by clicking the post title of any entry on this site.

I’ll be submitting the code additions to the original plugin author, but I don’t know if he’ll take them, since it is sort of an edge-case. In the meantime, feel free to comment here.

Here’s my modified plugin: Related Posts Mod 2.02.

Related posts

Technorati Tags: , , ,