Automatically use inclusion tags (?) in a template, depending on installed apps

Posted by Ludwik Trammer on Stack Overflow See other posts from Stack Overflow or by Ludwik Trammer
Published on 2010-04-06T11:07:12Z Indexed on 2010/04/10 21:03 UTC
Read the original article Hit count: 206

Filed under:
|

The title may be a little confusing, but I don't know how else to call it.

I would like to create a Django project with a large set of applications you could arbitrary turn on or off using INSTALLED_APPS option in settings.py (you would obviously also need to edit urls.py and run syncdb). After being turned on an app should be able to automatically:

  1. Register it's content in site-wide search. Luckily django-haystack has this built-in, so it's not a problem.

  2. Register cron jobs. django-cron does exactly that. Not a problem.

  3. Register a widget that should be displayed on the homepage. The homepage should include a list of boxes with widgets form different applications.

    I thought about inclusion tags, because you can put them anywhere on a page and they control both content and presentation. The problem is I don't know how to automatically get a list of inclusion tags provided by my applications, and display them one by one on a homepage. I need a way to register them somehow, and then display all registered tags.

© Stack Overflow or respective owner

Related posts about django

Related posts about django-templates