# import the User object
from django.contrib.auth.models import User
-from engine.manifold_api import ManifoldAPI
+from engine.manifoldapi import ManifoldAPI
# import time - this is used to create Django's internal username
def authenticate(self, username=None, password=None):
if not username or not password:
return None
- print username
try:
auth = {'AuthMethod': 'password', 'Username': username, 'AuthString': password}
import xmlrpclib
from myslice.config import Config
+debug=True
+
class ManifoldAPI:
def __init__(self, auth=None, cainfo=None):
def __getattr__(self, methodName):
def func(*args, **kwds):
- print methodName, self.auth, self.url
- result=getattr(self.proxy, methodName)(self.auth, *args, **kwds)
- return result
+ result=getattr(self.proxy, methodName)(self.auth, *args, **kwds)
+ if debug: print methodName, self.auth, self.url,'->',result
+ return result
return func
aq = self.analyzed_query.to_json() if self.analyzed_query else 'null'
return "new Query('%(a)s', '%(m)s', '%(t)s', %(f)s, %(p)s, %(c)s, %(unique)s, '%(uuid)s', %(aq)s, {{%(sq)s}})"%locals()
-
-
-
# . [ 'SliceList', 'TabbedView' ] : to debug these classes
# . True : to debug all plugin
-DEBUG= [ 'Tabs' ]
+#DEBUG= [ 'Tabs' ]
+DEBUG= False
class Plugin:
env ['settings_json' ] = settings_json
# compute plugin-specific initialization
js_init = render_to_string ( 'plugin-setenv.js', env )
- print 'js_init',js_init
self.add_js_chunks (request, js_init)
# interpret the result of requirements ()
border-style: dotted;
border-width: 1px;
}
+p.plugin-show {
+ cursor: s-resize;
+}
+p.plugin-hide {
+ cursor: n-resize;
+}
class Config:
-# manifold_server = 'manifold.pl.sophia.inria.fr'
- manifold_server = 'demo.myslice.info'
+ manifold_server = 'manifold.pl.sophia.inria.fr'
+# manifold_server = 'demo.myslice.info'
manifold_port = '7080'
manifold_path = '/'
}
}
-AUTHENTICATION_BACKENDS = ( 'auth.backend.MyCustomBackend', 'auth.manifold_backend.ManifoldBackend', )
+AUTHENTICATION_BACKENDS = ( 'auth.backend.MyCustomBackend', 'auth.manifoldbackend.ManifoldBackend', )
#################### for insert_above
#IA_JS_FORMAT = "<script type='text/javascript' src='{URL}' />"
def the_user (request):
"This code below is broken"
if not request.user.is_authenticated ():
- print 'void'
+# print 'void user!'
return ''
else:
return request.user.email