From a55cbcfb9f7f03cdefa6c68fb24bb15a9f9028db Mon Sep 17 00:00:00 2001 From: Will Thompson Date: Fri, 19 Feb 2016 10:36:55 +0000 Subject: [PATCH] DocumentProperties: add data field --- .../0003_documentproperties_data.py | 22 +++++++++++++++++++ pandora/entity/models.py | 2 +- 2 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 pandora/entity/migrations/0003_documentproperties_data.py diff --git a/pandora/entity/migrations/0003_documentproperties_data.py b/pandora/entity/migrations/0003_documentproperties_data.py new file mode 100644 index 000000000..43da3a450 --- /dev/null +++ b/pandora/entity/migrations/0003_documentproperties_data.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.9.2 on 2016-03-03 16:08 +from __future__ import unicode_literals + +from django.db import migrations +import oxdjango.fields + + +class Migration(migrations.Migration): + + dependencies = [ + ('entity', '0001_initial'), + ('entity', '0002_auto_20160304_1641'), + ] + + operations = [ + migrations.AddField( + model_name='documentproperties', + name='data', + field=oxdjango.fields.DictField(default={}), + ), + ] diff --git a/pandora/entity/models.py b/pandora/entity/models.py index ff1978358..08114db27 100644 --- a/pandora/entity/models.py +++ b/pandora/entity/models.py @@ -261,7 +261,7 @@ class DocumentProperties(models.Model): document = models.ForeignKey(Document) entity = models.ForeignKey(Entity, related_name='documentproperties') index = models.IntegerField(default=0) - + data = fields.DictField(default={}) def __unicode__(self): return u"%r-%r" % (self.document, self.entity)