source: sandbox/jabberit_messenger/trophy/strophejs/examples/attach/attacher/views.py @ 2271

Revision 2271, 475 bytes checked in by alexandrecorreia, 14 years ago (diff)

Ticket #986 - Reimplementar interface mais leve para o IM, sem a necessidades de plugins adicionais.

  • Property svn:executable set to *
Line 
1from django.http import HttpResponse
2from django.template import Context, loader
3
4from attach.settings import BOSH_SERVICE, JABBERID, PASSWORD
5from attach.boshclient import BOSHClient
6
7def index(request):
8    bc = BOSHClient(JABBERID, PASSWORD, BOSH_SERVICE)
9    bc.startSessionAndAuth()
10
11    t = loader.get_template("attacher/index.html")
12    c = Context({
13            'jid': bc.jabberid.full(),
14            'sid': bc.sid,
15            'rid': bc.rid,
16    })
17
18    return HttpResponse(t.render(c))
Note: See TracBrowser for help on using the repository browser.