From 38d432bdd9c0eebcdadf2be5c5915b80c7958155 Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Sun, 28 Nov 2010 17:31:53 +0100 Subject: [PATCH] layer --- pandora/annotaion/models.py | 6 ++++++ pandora/item/models.py | 2 +- pandora/settings.py | 3 ++- pandora/templates/admin/base_site.html | 2 +- 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/pandora/annotaion/models.py b/pandora/annotaion/models.py index 6a41e8b..f2e754c 100644 --- a/pandora/annotaion/models.py +++ b/pandora/annotaion/models.py @@ -56,6 +56,9 @@ class Layer(models.Model): def json(self): return {'id': self.name, 'title': self.title, 'type': self.type} + def __unicode__(self): + return self.title + class Annotation(models.Model): #FIXME: here having a item,start index would be good created = models.DateTimeField(auto_now_add=True) @@ -78,3 +81,6 @@ class Annotation(models.Model): return True return False + def __unicode__(self): + return "%s/%s-%s" %(self.item, self.start, self.stop) + diff --git a/pandora/item/models.py b/pandora/item/models.py index 2dcda7f..88eb9b2 100644 --- a/pandora/item/models.py +++ b/pandora/item/models.py @@ -47,7 +47,7 @@ def siteJson(): r['findKeys'].append(f) r['groups'] = [p.name for p in Property.objects.filter(group=True)] - r['layers'] = [l.json() for l in Layer.objects()] + r['layers'] = [l.json() for l in Layer.objects.all()] r['itemViews'] = [ {"id": "info", "title": "Info"}, diff --git a/pandora/settings.py b/pandora/settings.py index a9c6957..6705ceb 100644 --- a/pandora/settings.py +++ b/pandora/settings.py @@ -1,6 +1,7 @@ # -*- coding: utf-8 -*- # vi:si:et:sw=4:sts=4:ts=4 -# Django settings for pandora project. +# Django settings for pan.do/ra project defaults, +# create local_settings.py to overwrite import os from os.path import join, normpath diff --git a/pandora/templates/admin/base_site.html b/pandora/templates/admin/base_site.html index 2c03b9f..e85a786 100644 --- a/pandora/templates/admin/base_site.html +++ b/pandora/templates/admin/base_site.html @@ -1,7 +1,7 @@ {% extends "admin/base.html" %} {% load i18n %} -{% block title %}{{ title }} | 0xdb.org{% endblock %} +{% block title %}{{ title }} | pan.do/ra{% endblock %} {% block branding %}