Skip to content
This repository has been archived by the owner on Mar 27, 2022. It is now read-only.

Commit

Permalink
A few tweaks to the clusterer and models. Now to work on the HTML.
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewgodwin committed May 6, 2009
1 parent 35b1b2d commit 6bcf5be
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions djangopeoplenet/djangopeople/clustering.py
Expand Up @@ -24,6 +24,7 @@ def save_clusters(clusters, zoom):
longitude = cluster.mean[1],
number = len(cluster),
zoom = zoom,
djangoperson_id = len(cluster) == 1 and list(cluster.points)[0][2] or None,
)


Expand Down
6 changes: 5 additions & 1 deletion djangopeoplenet/djangopeople/models.py
Expand Up @@ -404,5 +404,9 @@ class ClusteredPoint(models.Model):
number = models.IntegerField()
djangoperson = models.ForeignKey(DjangoPerson, blank=True, null=True)

def __unicode__(self):
return "%s people at (%s,%s,z%s)" % (self.number, self.longitude, self.latitude, self.zoom)

class Admin:
pass
list_display = ("zoom", "latitude", "longitude", "number")
ordering = ("zoom",)

0 comments on commit 6bcf5be

Please sign in to comment.