|
Last change
on this file since 9177 was 9177, checked in by dennisw, 14 years ago |
|
Progress on showing nodes around mouse when hovering over map.
Right now, it returns some placeholder json object on click.
Next steps: replace placeholder with real data, print readable lines instead of [object Object], and get mouse boundaries.
|
|
File size:
558 bytes
|
| Line | |
|---|
| 1 | #!/usr/bin/env python
|
|---|
| 2 | #
|
|---|
| 3 | # View serving available WirelessLeiden Nodes in list on mouseover.
|
|---|
| 4 | #
|
|---|
| 5 | # Dennis Wagenaar
|
|---|
| 6 | # d.wagenaar@gmail.com
|
|---|
| 7 |
|
|---|
| 8 | from django.core.management import setup_environ
|
|---|
| 9 | from django.db.models import Max
|
|---|
| 10 | from django.http import HttpResponse
|
|---|
| 11 | from gheat.models import *
|
|---|
| 12 | import logging
|
|---|
| 13 | import pygame
|
|---|
| 14 | import sys
|
|---|
| 15 | import tempfile
|
|---|
| 16 |
|
|---|
| 17 |
|
|---|
| 18 | def serve_nodelist(request,lat,lon):
|
|---|
| 19 | import simplejson as json
|
|---|
| 20 | s = json.dumps({'4': 5, '6': 7}, sort_keys=True, indent=4 * ' ')
|
|---|
| 21 | html = '\n'.join([l.rstrip() for l in s.splitlines()])
|
|---|
| 22 | return HttpResponse(html)
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.