--- /dev/null
+# -*- coding: utf-8 -*-
+from __future__ import unicode_literals
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ('catalogue', '0006_category_tag'),
+ ]
+
+ operations = [
+ migrations.AddField(
+ model_name='document',
+ name='tags',
+ field=models.ManyToManyField(to='catalogue.Tag'),
+ ),
+ ]
from dvcs.models import Ref
from organizations.models import Organization
from catalogue.constants import STAGES
+from .tag import Tag
class Document(Ref):
stage = models.CharField(_('stage'), max_length=128, blank=True, default=STAGES[0])
assigned_to = models.ForeignKey(settings.AUTH_USER_MODEL, null=True, related_name='assignments')
deleted = models.BooleanField(default=False)
+ tags = models.ManyToManyField(Tag)
# Where to cache searchable stuff from metadata?
# Probably in some kind of search index.
--- /dev/null
+# -*- coding: utf-8 -*-
+from __future__ import unicode_literals
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ('catalogue', '0007_document_tags'),
+ ('organizations', '0007_auto_20160126_1148'),
+ ]
+
+ operations = [
+ migrations.AddField(
+ model_name='organization',
+ name='tags',
+ field=models.ManyToManyField(to='catalogue.Tag'),
+ ),
+ ]
preview_html_template = 'organizations/snippets/organization.html'
name = models.CharField(max_length=1024)
- #logo = models.ImageField(upload_to='people/logo', blank=True)
- #country = models.CharField(max_length=64, blank=True, choices=countries)
- #www = models.URLField(blank=True)
- #description = models.TextField(blank=True, default="")
- ##projects = JSONField(default=[])
- #projects = models.TextField(blank=True, default="")
+ tags = models.ManyToManyField('catalogue.Tag')
+ # logo = models.ImageField(upload_to='people/logo', blank=True)
+ # country = models.CharField(max_length=64, blank=True, choices=countries)
+ # www = models.URLField(blank=True)
+ # description = models.TextField(blank=True, default="")
+ # #projects = JSONField(default=[])
+ # projects = models.TextField(blank=True, default="")
- #preview_html = models.TextField(blank=True, default="")
+ # preview_html = models.TextField(blank=True, default="")
- #created_at = models.DateTimeField(auto_now_add=True)
+ # created_at = models.DateTimeField(auto_now_add=True)
def __str__(self):
return self.name