Sphene Community Tools

Community

Copyright © 2007-2018 by Herbert Poul

You are not logged in.
Login
Register

Change Language:



AddThis Social Bookmark Button

A Django site.

Powered by Sphene Community Tools
Board » Comments » comment category for "Community/UserProfiles (sct)" » I don't get it

well..
using profile_edit_init_form you can register a signal to modify the form (ie. display additional fields) before it is displayed to the user ..

if you want to add additional settings to a user profile you would have to listen to all three fields ... profile_edit_init_form to add your form field, profile_edit_save_form to save it once it was submitted and profile_display to actually display it ..

i would suggest if you are really interested into adding additional user profile fields to the SCT mechanism you take a look at e.g. sphene/sphboard/models.py how it adds the forum specific settings (e.g. the signature) to the profile settings page.. (or the sphene/community/models.py which adds most other fields)

since the code is a bit undocumented just ask if anything (specific) is unclear and i'll try to explain everything the best way i can :)

Hey, we have Signatures !!! Great, isn't it ? ;)
This makes me wonder though.. How are signals processed? In other words, if two functions are connected to the same signal, how does one know which one will come first?
well ... this is a django problem :) basically the one which is registered first. is called first (as far as i understand it)
so if you register a signal in models.py the one mentioned first in INSTALLED_APPS will be the first to get the signal.. (but the others will get it too obviously)
Hey, we have Signatures !!! Great, isn't it ? ;)

Please login to post a reply.



Powered by Sphene Community Tools