This commit is contained in:
j 2010-11-28 17:31:53 +01:00
parent da213d1745
commit 38d432bdd9
4 changed files with 10 additions and 3 deletions

View file

@ -56,6 +56,9 @@ class Layer(models.Model):
def json(self): def json(self):
return {'id': self.name, 'title': self.title, 'type': self.type} return {'id': self.name, 'title': self.title, 'type': self.type}
def __unicode__(self):
return self.title
class Annotation(models.Model): class Annotation(models.Model):
#FIXME: here having a item,start index would be good #FIXME: here having a item,start index would be good
created = models.DateTimeField(auto_now_add=True) created = models.DateTimeField(auto_now_add=True)
@ -78,3 +81,6 @@ class Annotation(models.Model):
return True return True
return False return False
def __unicode__(self):
return "%s/%s-%s" %(self.item, self.start, self.stop)

View file

@ -47,7 +47,7 @@ def siteJson():
r['findKeys'].append(f) r['findKeys'].append(f)
r['groups'] = [p.name for p in Property.objects.filter(group=True)] 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'] = [ r['itemViews'] = [
{"id": "info", "title": "Info"}, {"id": "info", "title": "Info"},

View file

@ -1,6 +1,7 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# vi:si:et:sw=4:sts=4:ts=4 # 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 import os
from os.path import join, normpath from os.path import join, normpath

View file

@ -1,7 +1,7 @@
{% extends "admin/base.html" %} {% extends "admin/base.html" %}
{% load i18n %} {% load i18n %}
{% block title %}{{ title }} | 0xdb.org{% endblock %} {% block title %}{{ title }} | pan.do/ra{% endblock %}
{% block branding %} {% block branding %}
<h1 id="site-name">0xdb.org</h1> <h1 id="site-name">0xdb.org</h1>