Thursday, July 1, 2010

Personalization and preferences?

On my web pages I have labels for text fields. I want user to be able
to personalize the labels.

Example :
default label: Employee, alternative is that user can choose -
Associate or Staff Member.
Depending on which label an user chooses, all screens should show that
label for that user. Other users can see other label they choose.
I am ok in providing fixed set of labels to choose from if that
simplifies things.
This problem is very similar to I18N except it is not based on locale.
What is the best approach?

Approach:
1. When user logs in - gets his preferences from DB and save it in
session.

2. I create a custom template {% getlabeltext employee %}

something like ** psuedo code **
def getLabelText('employee'):

if 'employee' in request.session:
return request.session['employee']
else:
return DEFAULT

Is there a better approach or some one already done in this?

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate