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
*
|
Rev | Line | |
---|
[2271] | 1 | from django.http import HttpResponse |
---|
| 2 | from django.template import Context, loader |
---|
| 3 | |
---|
| 4 | from attach.settings import BOSH_SERVICE, JABBERID, PASSWORD |
---|
| 5 | from attach.boshclient import BOSHClient |
---|
| 6 | |
---|
| 7 | def 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.