DocumentProperties: add data field

This commit is contained in:
Will Thompson 2016-02-19 10:36:55 +00:00 committed by j
parent 42ac4a88b8
commit a55cbcfb9f
2 changed files with 23 additions and 1 deletions

View file

@ -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={}),
),
]

View file

@ -261,7 +261,7 @@ class DocumentProperties(models.Model):
document = models.ForeignKey(Document) document = models.ForeignKey(Document)
entity = models.ForeignKey(Entity, related_name='documentproperties') entity = models.ForeignKey(Entity, related_name='documentproperties')
index = models.IntegerField(default=0) index = models.IntegerField(default=0)
data = fields.DictField(default={})
def __unicode__(self): def __unicode__(self):
return u"%r-%r" % (self.document, self.entity) return u"%r-%r" % (self.document, self.entity)