Hello Django Users, I sometimes have reversion installed and sometimes have a CACHE_BACKEND defined and came up with the following solution for determining if I should register a model or use cache specific functionality. Since I'm not a Python Guru I'm asking an evaluation of this method before I start using it in all my code. The length check on CACHE_BACKEND is in the even someone sets it to ''. Currently I started adding this to each file where it's relevant.
try: import reversion _USE_REVERSION=True except: _USE_REVERSION=False try: if len(settings.CACHE_BACKEND) > 0: _USE_CACHE=True except: _USE_CACHE=False Thank you, Mark --~--~---------~--~----~------------~-------~--~----~ 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---