| # Taking advantage of user profiles in your own ap | | # Taking advantage of user profiles in your own ap |
| plications | | plications |
| | | |
| The user profiles are ment to be as extensible as | | The user profiles are ment to be as extensible as |
| possible. To achieve this, at specific places whil | | possible. To achieve this, at specific places whil |
| e editing or displaying the profile signals are di | | e editing or displaying the profile signals are di |
| spatched which can be intercepted by any django ap | | spatched which can be intercepted by any django ap |
| plication to modify the resulting output. | | plication to modify the resulting output. |
| | | |
| Three signals are currently defined (all under sph | | Three signals are currently defined (all under sph |
| ene.community.signals) | | ene.community.signals) |
t | | t |
|
| - profile_edit_init_form: dispatched after initiat | | - profile_edit_init_form: dispatched after initiat |
| ing the form (django newforms). Allows application | | ing the form (django newforms). Allows application |
| s to add additional fields. | | s to add additional fields. |
| - profile_edit_save_form: Called after the basic u | | - profile_edit_save_form: Called after the basic u |
| ser information has been saved and further profile | | ser information has been saved and further profile |
| information can be retrieved and saved. (In this | | information can be retrieved and saved. (In this |
| stage the form was already validated) | | stage the form was already validated) |
| - profile_display: dispatched whenever a profile i | | - profile_display: dispatched whenever a profile i |
| s displayed. signal handlers can return a string w | | s displayed. signal handlers can return a string w |
| hich will be added to the HTML input inside a two- | | hich will be added to the HTML input inside a two- |
| column table tag. | | column table tag. |
| | | |
| I hope you now at least have grasp what could be d | | I hope you now at least have grasp what could be d |
| one currently. Since I'm not sure how useful this | | one currently. Since I'm not sure how useful this |
| can be I'm not extensively documenting this part. | | can be I'm not extensively documenting this part. |
| If you think this can be useful for you check for | | If you think this can be useful for you check for |
| example how sphboard uses these signals (sphenecol | | example how sphboard uses these signals (sphenecol |
| l/sphene/sphboard/models.py), post in the board or | | l/sphene/sphboard/models.py), post in the board or |
| write me (herbert.poul@gmail.com) an email. | | write me (herbert.poul@gmail.com) an email. |