diff --git a/django/website/data_layer/migrations/0004_auto_20150720_1723.py b/django/website/data_layer/migrations/0004_auto_20150720_1723.py new file mode 100644 index 0000000000000000000000000000000000000000..aaa9d331e09f6d9ddf98b5d9f0d4fbb9f5113da9 --- /dev/null +++ b/django/website/data_layer/migrations/0004_auto_20150720_1723.py @@ -0,0 +1,19 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import models, migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('data_layer', '0003_message_terms'), + ] + + operations = [ + migrations.AlterField( + model_name='message', + name='terms', + field=models.ManyToManyField(related_name='items', to='taxonomies.Term'), + ), + ] diff --git a/django/website/data_layer/models.py b/django/website/data_layer/models.py index 244aa6e90c65b97aea1b225cfcaa0f256b748d89..fa04cfe55ba847dac221853f1f24ea3953ad2e7d 100644 --- a/django/website/data_layer/models.py +++ b/django/website/data_layer/models.py @@ -12,7 +12,7 @@ class DataLayerModel(models.Model): class Message(DataLayerModel): body = models.TextField() timestamp = models.DateTimeField(null=True) - terms = models.ManyToManyField(Term) + terms = models.ManyToManyField(Term, related_name="items") def apply_term(self, term): # TODO: test this