Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Django plugin framework design patterns

I'm after some advice on how I can build a plugin system for my django project. I'm building a simple CMS but want it to be extensible.

Ideally I'm after an approach which will allow people to build plugins that extend the functionality of my project.

I have two main types of plugins;

Data plugin: for example a data plugin could be a "blog" plugin which will add blogging functionality to my CMS.

Decorator plugin: this plugin type would add functionality to existing apps, probably without it even knowing. An example would be a TinyMCE plugin which replaces all Text boxes with a TinyMCE rich editor.

I have seen both http://martyalchin.com/2008/jan/10/simple-plugin-framework/ but i'm not sure if this fits my requirements?

I also want to take templates into consideration when defining my plugin system. So what I mean is, when someone builds a plugin I need an approach which will allow plugins to appear in designated containers within the core template.

I've looked at http://code.google.com/p/django-app-plugins/ but was wondering if there are any other approaches people would suggest I look into/consider?

I understand this is very academic, but I just haven't had much success finding approaches I'm comfortable running with, so I would appreciate any advice that can be offered.

like image 941
Jamie Avatar asked May 31 '26 07:05

Jamie


1 Answers

I would recommend using something like this: simple plugins. As you stated since especially for plugin frameworks, they have to be adjusted to your needs a lot. Therefore you can change it simply since it is explained why it was developed the way it was.

Django-app-plugins is not actively developed as far as I know. In the end, you will end up writing and changing it anyhow. So why not jumping right in. Unfortunately, I don't know any other frameworks for this. I hope it still helped a bit.

like image 51
cwoebker Avatar answered Jun 02 '26 21:06

cwoebker



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!