Automatically use inclusion tags (?) in a template, depending on installed apps
- by Ludwik Trammer
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:
Register it's content in site-wide search. Luckily django-haystack has this built-in, so it's not a problem.
Register cron jobs. django-cron does exactly that. Not a problem.
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.