From: Thierry Parmentelat Date: Tue, 12 Feb 2013 14:09:20 +0000 (+0100) Subject: Merge branch 'master' of ssh://git.onelab.eu/git/myslice-django X-Git-Tag: myslice-django-0.1-1~89 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=de93a901d06d0f4f666ff0fcafd1fa024da144e1;hp=7484468cd960cad3b006958369dcfc8682aade91;p=unfold.git Merge branch 'master' of ssh://git.onelab.eu/git/myslice-django Conflicts: templates/view-login.html --- diff --git a/auth/views.py b/auth/views.py index d1e78b53..f6afa3fb 100644 --- a/auth/views.py +++ b/auth/views.py @@ -8,12 +8,15 @@ from django.http import HttpResponseRedirect from auth.backend import MyCustomBackend from myslice.viewutils import the_user +from myslice.config import Config def login_user(request): state = "Please log in below..." username = password = '' - env={'hard_wired_users':MyCustomBackend.hard_wired_users} - + env={'hard_wired_users':MyCustomBackend.hard_wired_users, + 'manifold_url':Config.manifold_url(), + } + if request.POST: username = request.POST.get('username') password = request.POST.get('password') diff --git a/engine/manifold_api.py b/engine/manifold_api.py index f827b518..c166bd8c 100644 --- a/engine/manifold_api.py +++ b/engine/manifold_api.py @@ -16,7 +16,7 @@ class ManifoldAPI: self.trace = [] self.calls = {} self.multicall = False - self.url = "http://"+self.server+":"+self.port+"/" + self.url = config.manifold_url() self.proxy = xmlrpclib.Server(self.url, verbose=False, allow_none=True) def __getattr__(self, methodName): diff --git a/myslice/config.py b/myslice/config.py index b882b7d4..84a0ee0d 100644 --- a/myslice/config.py +++ b/myslice/config.py @@ -4,3 +4,7 @@ class Config: manifold_server = 'debian04.pl.sophia.inria.fr' manifold_port = '7080' manifold_path = '/' + + @staticmethod + def manifold_url (): + return "http://%s:%s%s"%(Config.manifold_server,Config.manifold_port,Config.manifold_path) diff --git a/templates/view-login.html b/templates/view-login.html index 3edcff0c..5a5aeb45 100644 --- a/templates/view-login.html +++ b/templates/view-login.html @@ -5,16 +5,16 @@ {% endblock content_related %} {% block content_main %} -
- -This page is currently connected to the Manifold authentication backend, By default it is pointing to the Manifold API running at "demo.myslice.info", in case you want to point it to your own Manifold API, please edit engine/manifold_api.py. -

-And also, as a proof of concept, it uses a set of hardwired user accounts for testing purposes, see auth/backend.py for more details. -
-

Currently hard wired users:

+ This page is currently connected to two authentication systems: + {% endblock content_main %}