--- /dev/null
+# -*- coding: utf-8 -*-
+from __future__ import unicode_literals
+
+from django.db import models, migrations
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ('catalogue', '0004_remove_booktags_count_related_info'),
+ ]
+
+ operations = [
+ migrations.AlterField(
+ model_name='book',
+ name='title',
+ field=models.CharField(max_length=32767, verbose_name='Title'),
+ ),
+ ]
class Book(models.Model):
"""Represents a book imported from WL-XML."""
- title = models.CharField(_('title'), max_length=120)
+ title = models.CharField(_('title'), max_length=32767)
sort_key = models.CharField(_('sort key'), max_length=120, db_index=True, editable=False)
sort_key_author = models.CharField(_('sort key by author'), max_length=120, db_index=True, editable=False, default=u'')
slug = models.SlugField(_('slug'), max_length=120, db_index=True,
def save(self, force_insert=False, force_update=False, **kwargs):
from sortify import sortify
- self.sort_key = sortify(self.title)
+ self.sort_key = sortify(self.title)[:120]
self.title = unicode(self.title) # ???
try:
--- /dev/null
+# -*- coding: utf-8 -*-
+from __future__ import unicode_literals
+
+from django.db import models, migrations
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ('picture', '0003_auto_20140924_1559'),
+ ]
+
+ operations = [
+ migrations.AlterField(
+ model_name='picture',
+ name='title',
+ field=models.CharField(max_length=32767, verbose_name='Title'),
+ ),
+ ]
Picture resource.
"""
- title = models.CharField(_('title'), max_length=255)
+ title = models.CharField(_('title'), max_length=32767)
slug = models.SlugField(_('slug'), max_length=120, db_index=True, unique=True)
sort_key = models.CharField(_('sort key'), max_length=120, db_index=True, editable=False)
sort_key_author = models.CharField(_('sort key by author'), max_length=120, db_index=True, editable=False, default=u'')
raise Picture.AlreadyExists('Picture %s already exists' % picture_xml.slug)
picture.areas.all().delete()
- picture.title = unicode(picture_xml.picture_info.title)[:255]
+ picture.title = unicode(picture_xml.picture_info.title)
picture.extra_info = picture_xml.picture_info.to_dict()
picture_tags = set(catalogue.models.Tag.tags_from_info(picture_xml.picture_info))