forked from 0x2620/pandora
DocumentProperties: add data field
This commit is contained in:
parent
42ac4a88b8
commit
a55cbcfb9f
2 changed files with 23 additions and 1 deletions
22
pandora/entity/migrations/0003_documentproperties_data.py
Normal file
22
pandora/entity/migrations/0003_documentproperties_data.py
Normal 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={}),
|
||||||
|
),
|
||||||
|
]
|
|
@ -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)
|
||||||
|
|
Loading…
Reference in a new issue