Extensible profile integration

asked 2012-05-09 08:38:56 -0600

Alban gravatar image

updated 2012-06-19 11:17:35 -0600


I am trying to integrate Askbot in an application that already uses django-userena. It means that I already have custum profile for users. I would like to avoid monkey patching performed by Askbot on django User models.

Somebody have already plugged userena with Askbot? Is it in the dev plan of Askbot?


[UPDATE] WIP here : https://github.com/atiberghien/askbot-devel

edit retag flag offensive close merge delete


Looks like a well maintaned app, we will have to have a look.

I have not heard of this application before so it is not in our plans. We'll need to know more about it to give you an answer.

Evgeny gravatar imageEvgeny ( 2012-05-09 18:49:51 -0600 )edit

This module introduces all needed features to deal with registration and authentification. It is compliant with the django profile specification. I will try this integration on my own fork of Askbot. Are there some tricky stuff in the code related to User models?

Alban gravatar imageAlban ( 2012-05-10 02:48:26 -0600 )edit

I am not sure how to go about integration with this app at this point and whether it is necessary, so I cannot guarantee that your work will be merged into the trunk (telling you just in case before you have done a lot of work). Will using this app add database queries per request? It is possible to disable askbot's built in authentication system and replace with any other. If that's the goal - there is no need to modify askbot to add your app.

Evgeny gravatar imageEvgeny ( 2012-05-10 09:19:23 -0600 )edit

Maybe it would be better for askbot to be concerned with saving it's own profile data and if the some developer wants to have a custom approach - make askbot to be able to get out of the way and let the developer do what he wants, rather than imposing a specific way to deal with the user profiles? Also - user profile and authentication are separarte functions - perhaps it would be better to keep them separate. My preferred approach is to do less when solving a problem and allow others to more easily customize application of askbot - via configuration rather than modifying core of the app.

Evgeny gravatar imageEvgeny ( 2012-05-10 09:27:09 -0600 )edit

I have just released this work on my own fork of Askbot (https://github.com/atiberghien/askbot-devel). I have created a abstract model that gather all field that are previously monkey-patched in User. This implementation is compliant to the django specification and can be extend with the AUTH_PROFILE_MODULE field in settings.py. It is really a WIP. The next step is to progressively migrate the code using Profile model instead of User model.

Alban gravatar imageAlban ( 2012-06-19 10:39:11 -0600 )edit