How to use askbot as a pluggable django app?
I have seen mentioned in a few places that it shouldn't be too much work to integrate askbot into an existing django-based project (e.g., see here), however I haven't been able to find a comprehensive answer to how feasible that is. Has anyone actually done this? What needs to happen to make it work?
There are three ways to do integration: either as a pluggable app as part of the main site, as a separate site backed by the same DB using the django sites framework, or as "multiple Django instances hosting different parts of your URL space, allowing them to have multiple settings files." (That last option came from here, though I'll admit I'm not exactly sure how this would work in practice)
All thses options have a few obvious issues:
- Does askbot still monkey-patch the django user model? I haven't found where that actually happens in the askbot source. What would be needed to clean that up? What else is being monkey patched? Is all of this black-magic contained in the
- What to do with existing users? OSQA's answer to this question isn't very encouraging: "OSQA is not meant to follow the philosophy of reusable django apps" -- I'm hoping askbot is a bit better in this regard. Is just running "add_missing_subscriptions" sufficient?
- Beyond creating the User entries, what happens when a user is registered? Is it possible to use an external django user registration system? (ie can the process of migrating existing users happen continuously for new signups?) Obviously this is a bit different depending on whether askbot is installed as an app within the larger project or just backed by the same DB, since in the former case, it should be pretty easy to use signals to do any needed updates. In the multi-project configuration, some sort of (probably ugly) rpc layer might have to be used.
- Is there any problem using Django 1.3? (Could askbot be coerced into using the static files framework?)
- Are there any other standard Django best-practices that askbot doesn't follow, which I should be aware of?
Hmmm...that ended up being pretty long. And I'm sure there are a few other gotchas that I'm missing :P
Anyways, we've been pretty impressed after playing a bit with our standalone test deployment of Askbot, so I'm excited to get it integrated with the rest of our project. I do have some django development experience, so if there is a bit of work to do on askbot's core in order to make it more easily pluggable, I'm certainly willing to contribute, but before I sink too much time going down that path, I'd like to get some idea of the scope of the problems to be overcome.