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 and
save-  Associate or Staff Member as label to be shown on all screens.


Approach I can think of:

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

2. I create a custom template tag {% getlabeltext Employee %}

which is something like ( following is the psuedo code)

def getlabeltext(label):
''' if user has choosen another label use it else return the
default.'''
   if label in request.session:
        return request.session[label]
   else:
       return label


Is there a better approach I should look at?

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

Reply via email to