translate most modules to using print() as imported from __future__
[unfold.git] / unfold / loginrequired.py
index 92f9ddb..2aca0d0 100644 (file)
@@ -1,10 +1,12 @@
+from __future__ import print_function
+
 from django.contrib.auth.decorators     import login_required
 from django.utils.decorators            import method_decorator
 from django.http                        import HttpResponseRedirect
 # for 'as_view' that we need to call in urls.py and the like
 from django.views.generic.base          import TemplateView
 
-from manifold.manifoldresult            import ManifoldException
+from manifoldapi.manifoldresult            import ManifoldException
 
 ###
 # IMPORTANT NOTE
@@ -45,7 +47,7 @@ def logout_on_manifold_exception (fun_that_returns_httpresponse):
             return HttpResponseRedirect ('/')
         except Exception, e:
             # xxx we need to sugarcoat this error message in some error template...
-            print "Unexpected exception",e
+            print("Unexpected exception",e)
             import traceback
             traceback.print_exc()
             return HttpResponseRedirect ('/')