source: src/django_gheat/website/nodelist.py@ 9177

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
8from django.core.management import setup_environ
9from django.db.models import Max
10from django.http import HttpResponse
11from gheat.models import *
12import logging
13import pygame
14import sys
15import tempfile
16
17
18def 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.