Howdy pinco,
Off the top of my head I don't see away to avoid the test, but you
could bundle it into a method of the Product class:
<code>
def get_preferred_measure(self, request):
if request.session['user_preference'] == "cm":
return self.measure_cm
return self.measure_in
</code>
--gordy
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---