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')
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):
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)
{% endblock content_related %}
{% block content_main %}
-</br>
-<code>
-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.
-</br></br>
-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.
-</code>
-<p>Currently hard wired users:</p>
+<code> This page is currently connected to two authentication systems:</code>
+<ul>
+<li> A manifold server, located at <code>{{ manifold_url }}</code>, (configured in <code>myslice/config.py</code>), and</li>
+<li>
+as a proof of concept, a set of hardwired user accounts, see <code>auth/backend.py</code> for more details.
+Currently hard wired users are:
<ul>
{% for k,v in hard_wired_users.iteritems %}
<li class='well'> Name= <code>{{ k }}</code>, Password= <code>{{ v }}</code> </li>
{% endfor %}
</ul>
+</li></ul>
{% endblock content_main %}