StropheCappuccino API 1.0.0
/tmp/tempDoc.doc/strophejs/examples/attach/attacher/views.py
Go to the documentation of this file.
00001 from django.http import HttpResponse
00002 from django.template import Context, loader
00003 
00004 from attach.settings import BOSH_SERVICE, JABBERID, PASSWORD
00005 from attach.boshclient import BOSHClient
00006 
00007 def index(request):
00008     bc = BOSHClient(JABBERID, PASSWORD, BOSH_SERVICE)
00009     bc.startSessionAndAuth()
00010 
00011     t = loader.get_template("attacher/index.html")
00012     c = Context({
00013             'jid': bc.jabberid.full(),
00014             'sid': bc.sid,
00015             'rid': bc.rid,
00016     })
00017 
00018     return HttpResponse(t.render(c))
 All Classes Namespaces Files Functions Variables