TAGS
private_local_settings.py
/conifer/.dired
+/conifer/local_settings.py
+*~
\ No newline at end of file
import warnings
from conifer.syrup import models
from datetime import datetime
+import django.conf
from django.contrib.auth import authenticate, login, logout
from django.contrib.auth.decorators import login_required
from django.contrib.auth.models import User, SiteProfileNotAvailable
from conifer.syrup.fuzzy_match import rank_pending_items
from django.core.urlresolvers import reverse
from conifer.here import HERE
+import pdb
#-----------------------------------------------------------------------------
# Z39.50 Support
'instructors': (Q(member__course__access__in=('LOGIN','ANON')) | Q(member__course__member__user=user)),
}
return filters
+
+#------------------------------------------------------------
+
+# decorator
+def postmortem(func):
+ """Drop into a debugger if an error occurs in the decoratee."""
+ def inner(*args, **kwargs):
+ try:
+ return func(*args, **kwargs)
+ except Exception, e:
+ print '!!!!!!', e
+ pdb.post_mortem()
+ if django.conf.settings.DEBUG:
+ return inner
+ else:
+ return func