From: Radek Czajka
- {% if book.get_extra_info_value.license %}
+ {% if book.extra_info.license %}
{% trans "This work is licensed under:" %}
- {{ book.get_extra_info_value.license_description }}
+ {{ book.extra_info.license_description }}
{% else %}
{% blocktrans %}This work isn't covered by copyright and is part of the
public domain, which means it can be freely used, published and
@@ -16,15 +16,15 @@
{% endif %}
{% trans "Text prepared based on:" %} {{ book.get_extra_info_value.source_name }} {% trans "Text prepared based on:" %} {{ book.extra_info.source_name }} {{ book.get_extra_info_value.description }} {{ book.extra_info.description }} {% trans "Edited and annotated by:" %}
- {% all_editors book.get_extra_info_value %}.
\n'.join(lines)
diff --git a/apps/catalogue/fields.py b/apps/catalogue/fields.py
index 390fb0359..5ab78eb03 100644
--- a/apps/catalogue/fields.py
+++ b/apps/catalogue/fields.py
@@ -2,68 +2,8 @@
# This file is part of Wolnelektury, licensed under GNU Affero GPLv3 or later.
# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information.
#
-import datetime
-
-from django.conf import settings
from django.db import models
from django.db.models.fields.files import FieldFile
-from django import forms
-from django.utils import simplejson as json
-from django.utils.translation import ugettext_lazy as _
-
-
-class JSONEncoder(json.JSONEncoder):
- def default(self, obj):
- if isinstance(obj, datetime.datetime):
- return obj.strftime('%Y-%m-%d %H:%M:%S')
- elif isinstance(obj, datetime.date):
- return obj.strftime('%Y-%m-%d')
- elif isinstance(obj, datetime.time):
- return obj.strftime('%H:%M:%S')
- return json.JSONEncoder.default(self, obj)
-
-
-def dumps(data):
- return JSONEncoder().encode(data)
-
-
-def loads(str):
- return json.loads(str, encoding=settings.DEFAULT_CHARSET)
-
-
-class JSONFormField(forms.CharField):
- widget = forms.Textarea
-
- def clean(self, value):
- try:
- loads(value)
- return value
- except ValueError, e:
- raise forms.ValidationError(_('Enter a valid JSON value. Error: %s') % e)
-
-
-class JSONField(models.TextField):
- def formfield(self, **kwargs):
- defaults = {'form_class': JSONFormField}
- defaults.update(kwargs)
- return super(JSONField, self).formfield(**defaults)
-
- def db_type(self, connection):
- return 'text'
-
- def get_internal_type(self):
- return 'TextField'
-
- def contribute_to_class(self, cls, name):
- super(JSONField, self).contribute_to_class(cls, name)
-
- def get_value(model_instance):
- return loads(getattr(model_instance, self.attname, None))
- setattr(cls, 'get_%s_value' % self.name, get_value)
-
- def set_value(model_instance, json):
- return setattr(model_instance, self.attname, dumps(json))
- setattr(cls, 'set_%s_value' % self.name, set_value)
class OverwritingFieldFile(FieldFile):
@@ -89,7 +29,6 @@ try:
# check for south
from south.modelsinspector import add_introspection_rules
- add_introspection_rules([], ["^catalogue\.fields\.JSONField"])
add_introspection_rules([], ["^catalogue\.fields\.OverwritingFileField"])
except ImportError:
pass
diff --git a/apps/catalogue/migrations/0001_initial.py b/apps/catalogue/migrations/0001_initial.py
index 045b2f204..38a31e914 100644
--- a/apps/catalogue/migrations/0001_initial.py
+++ b/apps/catalogue/migrations/0001_initial.py
@@ -13,15 +13,15 @@ class Migration(SchemaMigration):
('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('name', self.gf('django.db.models.fields.CharField')(max_length=50, db_index=True)),
('slug', self.gf('django.db.models.fields.SlugField')(max_length=120, db_index=True)),
- ('sort_key', self.gf('django.db.models.fields.SlugField')(max_length=120, db_index=True)),
+ ('sort_key', self.gf('django.db.models.fields.CharField')(max_length=120, db_index=True)),
('category', self.gf('django.db.models.fields.CharField')(max_length=50, db_index=True)),
('description', self.gf('django.db.models.fields.TextField')(blank=True)),
- ('main_page', self.gf('django.db.models.fields.BooleanField')(default=False, db_index=True)),
('user', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.User'], null=True, blank=True)),
- ('book_count', self.gf('django.db.models.fields.IntegerField')(null=True)),
- ('death', self.gf('django.db.models.fields.IntegerField')(null=True, blank=True)),
+ ('book_count', self.gf('django.db.models.fields.IntegerField')(null=True, blank=True)),
('gazeta_link', self.gf('django.db.models.fields.CharField')(max_length=240, blank=True)),
('wiki_link', self.gf('django.db.models.fields.CharField')(max_length=240, blank=True)),
+ ('created_at', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, db_index=True, blank=True)),
+ ('changed_at', self.gf('django.db.models.fields.DateTimeField')(auto_now=True, db_index=True, blank=True)),
))
db.send_create_signal('catalogue', ['Tag'])
@@ -40,37 +40,43 @@ class Migration(SchemaMigration):
# Adding unique constraint on 'TagRelation', fields ['tag', 'content_type', 'object_id']
db.create_unique('catalogue_tag_relation', ['tag_id', 'content_type_id', 'object_id'])
+ # Adding model 'BookMedia'
+ db.create_table('catalogue_bookmedia', (
+ ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
+ ('type', self.gf('django.db.models.fields.CharField')(max_length='100')),
+ ('name', self.gf('django.db.models.fields.CharField')(max_length='100')),
+ ('file', self.gf('catalogue.fields.OverwritingFileField')(max_length=100)),
+ ('uploaded_at', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, blank=True)),
+ ('extra_info', self.gf('jsonfield.fields.JSONField')(default='{}')),
+ ('book', self.gf('django.db.models.fields.related.ForeignKey')(related_name='media', to=orm['catalogue.Book'])),
+ ('source_sha1', self.gf('django.db.models.fields.CharField')(max_length=40, null=True, blank=True)),
+ ))
+ db.send_create_signal('catalogue', ['BookMedia'])
+
# Adding model 'Book'
db.create_table('catalogue_book', (
('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('title', self.gf('django.db.models.fields.CharField')(max_length=120)),
+ ('sort_key', self.gf('django.db.models.fields.CharField')(max_length=120, db_index=True)),
('slug', self.gf('django.db.models.fields.SlugField')(unique=True, max_length=120, db_index=True)),
+ ('common_slug', self.gf('django.db.models.fields.SlugField')(max_length=120, db_index=True)),
+ ('language', self.gf('django.db.models.fields.CharField')(default='pol', max_length=3, db_index=True)),
('description', self.gf('django.db.models.fields.TextField')(blank=True)),
- ('created_at', self.gf('django.db.models.fields.DateTimeField')(auto_now=True, blank=True)),
- ('_short_html', self.gf('django.db.models.fields.TextField')()),
- ('_short_html_de', self.gf('django.db.models.fields.TextField')(null=True, blank=True)),
- ('_short_html_en', self.gf('django.db.models.fields.TextField')(null=True, blank=True)),
- ('_short_html_es', self.gf('django.db.models.fields.TextField')(null=True, blank=True)),
- ('_short_html_fr', self.gf('django.db.models.fields.TextField')(null=True, blank=True)),
- ('_short_html_lt', self.gf('django.db.models.fields.TextField')(null=True, blank=True)),
- ('_short_html_pl', self.gf('django.db.models.fields.TextField')(null=True, blank=True)),
- ('_short_html_ru', self.gf('django.db.models.fields.TextField')(null=True, blank=True)),
- ('_short_html_uk', self.gf('django.db.models.fields.TextField')(null=True, blank=True)),
+ ('created_at', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, db_index=True, blank=True)),
+ ('changed_at', self.gf('django.db.models.fields.DateTimeField')(auto_now=True, db_index=True, blank=True)),
('parent_number', self.gf('django.db.models.fields.IntegerField')(default=0)),
- ('extra_info', self.gf('catalogue.fields.JSONField')()),
+ ('extra_info', self.gf('jsonfield.fields.JSONField')(default='{}')),
('gazeta_link', self.gf('django.db.models.fields.CharField')(max_length=240, blank=True)),
('wiki_link', self.gf('django.db.models.fields.CharField')(max_length=240, blank=True)),
- ('xml_file', self.gf('django.db.models.fields.files.FileField')(max_length=100, blank=True)),
- ('html_file', self.gf('django.db.models.fields.files.FileField')(max_length=100, blank=True)),
+ ('cover', self.gf('django.db.models.fields.files.FileField')(max_length=100, null=True, blank=True)),
+ ('parent', self.gf('django.db.models.fields.related.ForeignKey')(blank=True, related_name='children', null=True, to=orm['catalogue.Book'])),
+ ('_related_info', self.gf('jsonfield.fields.JSONField')(null=True, blank=True)),
('pdf_file', self.gf('django.db.models.fields.files.FileField')(max_length=100, blank=True)),
('epub_file', self.gf('django.db.models.fields.files.FileField')(max_length=100, blank=True)),
- ('odt_file', self.gf('django.db.models.fields.files.FileField')(max_length=100, blank=True)),
+ ('mobi_file', self.gf('django.db.models.fields.files.FileField')(max_length=100, blank=True)),
('txt_file', self.gf('django.db.models.fields.files.FileField')(max_length=100, blank=True)),
- ('mp3_file', self.gf('django.db.models.fields.files.FileField')(max_length=100, blank=True)),
- ('ogg_file', self.gf('django.db.models.fields.files.FileField')(max_length=100, blank=True)),
- ('parent', self.gf('django.db.models.fields.related.ForeignKey')(blank=True, related_name='children', null=True, to=orm['catalogue.Book'])),
- ('_tag_counter', self.gf('catalogue.fields.JSONField')(null=True)),
- ('_theme_counter', self.gf('catalogue.fields.JSONField')(null=True)),
+ ('html_file', self.gf('django.db.models.fields.files.FileField')(max_length=100, blank=True)),
+ ('xml_file', self.gf('django.db.models.fields.files.FileField')(max_length=100, blank=True)),
))
db.send_create_signal('catalogue', ['Book'])
@@ -79,41 +85,19 @@ class Migration(SchemaMigration):
('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('text', self.gf('django.db.models.fields.TextField')()),
('short_text', self.gf('django.db.models.fields.TextField')()),
- ('_short_html', self.gf('django.db.models.fields.TextField')()),
- ('_short_html_de', self.gf('django.db.models.fields.TextField')(null=True, blank=True)),
- ('_short_html_en', self.gf('django.db.models.fields.TextField')(null=True, blank=True)),
- ('_short_html_es', self.gf('django.db.models.fields.TextField')(null=True, blank=True)),
- ('_short_html_fr', self.gf('django.db.models.fields.TextField')(null=True, blank=True)),
- ('_short_html_lt', self.gf('django.db.models.fields.TextField')(null=True, blank=True)),
- ('_short_html_pl', self.gf('django.db.models.fields.TextField')(null=True, blank=True)),
- ('_short_html_ru', self.gf('django.db.models.fields.TextField')(null=True, blank=True)),
- ('_short_html_uk', self.gf('django.db.models.fields.TextField')(null=True, blank=True)),
('anchor', self.gf('django.db.models.fields.CharField')(max_length=120)),
('book', self.gf('django.db.models.fields.related.ForeignKey')(related_name='fragments', to=orm['catalogue.Book'])),
))
db.send_create_signal('catalogue', ['Fragment'])
- # Adding model 'BookStub'
- db.create_table('catalogue_bookstub', (
- ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
- ('title', self.gf('django.db.models.fields.CharField')(max_length=120)),
- ('author', self.gf('django.db.models.fields.CharField')(max_length=120)),
- ('pd', self.gf('django.db.models.fields.IntegerField')(null=True, blank=True)),
- ('slug', self.gf('django.db.models.fields.SlugField')(unique=True, max_length=120, db_index=True)),
- ('translator', self.gf('django.db.models.fields.TextField')(blank=True)),
- ('translator_death', self.gf('django.db.models.fields.TextField')(blank=True)),
- ))
- db.send_create_signal('catalogue', ['BookStub'])
-
- # Adding model 'FileRecord'
- db.create_table('catalogue_filerecord', (
- ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
- ('slug', self.gf('django.db.models.fields.SlugField')(max_length=120, db_index=True)),
- ('type', self.gf('django.db.models.fields.CharField')(max_length=20, db_index=True)),
- ('sha1', self.gf('django.db.models.fields.CharField')(max_length=40)),
- ('time', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, blank=True)),
+ # Adding model 'Collection'
+ db.create_table('catalogue_collection', (
+ ('title', self.gf('django.db.models.fields.CharField')(max_length=120, db_index=True)),
+ ('slug', self.gf('django.db.models.fields.SlugField')(max_length=120, primary_key=True, db_index=True)),
+ ('description', self.gf('django.db.models.fields.TextField')(null=True, blank=True)),
+ ('book_slugs', self.gf('django.db.models.fields.TextField')()),
))
- db.send_create_signal('catalogue', ['FileRecord'])
+ db.send_create_signal('catalogue', ['Collection'])
def backwards(self, orm):
@@ -130,17 +114,17 @@ class Migration(SchemaMigration):
# Deleting model 'TagRelation'
db.delete_table('catalogue_tag_relation')
+ # Deleting model 'BookMedia'
+ db.delete_table('catalogue_bookmedia')
+
# Deleting model 'Book'
db.delete_table('catalogue_book')
# Deleting model 'Fragment'
db.delete_table('catalogue_fragment')
- # Deleting model 'BookStub'
- db.delete_table('catalogue_bookstub')
-
- # Deleting model 'FileRecord'
- db.delete_table('catalogue_filerecord')
+ # Deleting model 'Collection'
+ db.delete_table('catalogue_collection')
models = {
@@ -174,66 +158,50 @@ class Migration(SchemaMigration):
'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})
},
'catalogue.book': {
- 'Meta': {'ordering': "('title',)", 'object_name': 'Book'},
- '_short_html': ('django.db.models.fields.TextField', [], {}),
- '_short_html_de': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_en': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_es': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_fr': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_lt': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_pl': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_ru': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_uk': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_tag_counter': ('catalogue.fields.JSONField', [], {'null': 'True'}),
- '_theme_counter': ('catalogue.fields.JSONField', [], {'null': 'True'}),
- 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
+ 'Meta': {'ordering': "('sort_key',)", 'object_name': 'Book'},
+ '_related_info': ('jsonfield.fields.JSONField', [], {'null': 'True', 'blank': 'True'}),
+ 'changed_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'db_index': 'True', 'blank': 'True'}),
+ 'common_slug': ('django.db.models.fields.SlugField', [], {'max_length': '120', 'db_index': 'True'}),
+ 'cover': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
+ 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'db_index': 'True', 'blank': 'True'}),
'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
'epub_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'}),
- 'extra_info': ('catalogue.fields.JSONField', [], {}),
+ 'extra_info': ('jsonfield.fields.JSONField', [], {'default': "'{}'"}),
'gazeta_link': ('django.db.models.fields.CharField', [], {'max_length': '240', 'blank': 'True'}),
'html_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'mp3_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'}),
- 'odt_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'}),
- 'ogg_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'}),
+ 'language': ('django.db.models.fields.CharField', [], {'default': "'pol'", 'max_length': '3', 'db_index': 'True'}),
+ 'mobi_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'}),
'parent': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'children'", 'null': 'True', 'to': "orm['catalogue.Book']"}),
'parent_number': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
'pdf_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'}),
'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '120', 'db_index': 'True'}),
+ 'sort_key': ('django.db.models.fields.CharField', [], {'max_length': '120', 'db_index': 'True'}),
'title': ('django.db.models.fields.CharField', [], {'max_length': '120'}),
'txt_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'}),
'wiki_link': ('django.db.models.fields.CharField', [], {'max_length': '240', 'blank': 'True'}),
'xml_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'})
},
- 'catalogue.bookstub': {
- 'Meta': {'ordering': "('title',)", 'object_name': 'BookStub'},
- 'author': ('django.db.models.fields.CharField', [], {'max_length': '120'}),
+ 'catalogue.bookmedia': {
+ 'Meta': {'ordering': "('type', 'name')", 'object_name': 'BookMedia'},
+ 'book': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'media'", 'to': "orm['catalogue.Book']"}),
+ 'extra_info': ('jsonfield.fields.JSONField', [], {'default': "'{}'"}),
+ 'file': ('catalogue.fields.OverwritingFileField', [], {'max_length': '100'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'pd': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}),
- 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '120', 'db_index': 'True'}),
- 'title': ('django.db.models.fields.CharField', [], {'max_length': '120'}),
- 'translator': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
- 'translator_death': ('django.db.models.fields.TextField', [], {'blank': 'True'})
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': "'100'"}),
+ 'source_sha1': ('django.db.models.fields.CharField', [], {'max_length': '40', 'null': 'True', 'blank': 'True'}),
+ 'type': ('django.db.models.fields.CharField', [], {'max_length': "'100'"}),
+ 'uploaded_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'})
},
- 'catalogue.filerecord': {
- 'Meta': {'ordering': "('-time', '-slug', '-type')", 'object_name': 'FileRecord'},
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'sha1': ('django.db.models.fields.CharField', [], {'max_length': '40'}),
- 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '120', 'db_index': 'True'}),
- 'time': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
- 'type': ('django.db.models.fields.CharField', [], {'max_length': '20', 'db_index': 'True'})
+ 'catalogue.collection': {
+ 'Meta': {'ordering': "('title',)", 'object_name': 'Collection'},
+ 'book_slugs': ('django.db.models.fields.TextField', [], {}),
+ 'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
+ 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '120', 'primary_key': 'True', 'db_index': 'True'}),
+ 'title': ('django.db.models.fields.CharField', [], {'max_length': '120', 'db_index': 'True'})
},
'catalogue.fragment': {
'Meta': {'ordering': "('book', 'anchor')", 'object_name': 'Fragment'},
- '_short_html': ('django.db.models.fields.TextField', [], {}),
- '_short_html_de': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_en': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_es': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_fr': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_lt': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_pl': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_ru': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_uk': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
'anchor': ('django.db.models.fields.CharField', [], {'max_length': '120'}),
'book': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'fragments'", 'to': "orm['catalogue.Book']"}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
@@ -242,16 +210,16 @@ class Migration(SchemaMigration):
},
'catalogue.tag': {
'Meta': {'ordering': "('sort_key',)", 'unique_together': "(('slug', 'category'),)", 'object_name': 'Tag'},
- 'book_count': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
+ 'book_count': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}),
'category': ('django.db.models.fields.CharField', [], {'max_length': '50', 'db_index': 'True'}),
- 'death': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}),
+ 'changed_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'db_index': 'True', 'blank': 'True'}),
+ 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'db_index': 'True', 'blank': 'True'}),
'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
'gazeta_link': ('django.db.models.fields.CharField', [], {'max_length': '240', 'blank': 'True'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'main_page': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'db_index': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '50', 'db_index': 'True'}),
'slug': ('django.db.models.fields.SlugField', [], {'max_length': '120', 'db_index': 'True'}),
- 'sort_key': ('django.db.models.fields.SlugField', [], {'max_length': '120', 'db_index': 'True'}),
+ 'sort_key': ('django.db.models.fields.CharField', [], {'max_length': '120', 'db_index': 'True'}),
'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'blank': 'True'}),
'wiki_link': ('django.db.models.fields.CharField', [], {'max_length': '240', 'blank': 'True'})
},
diff --git a/apps/catalogue/migrations/0002_auto__add_field_book_daisy_file.py b/apps/catalogue/migrations/0002_auto__add_field_book_daisy_file.py
deleted file mode 100644
index 8f5c088ed..000000000
--- a/apps/catalogue/migrations/0002_auto__add_field_book_daisy_file.py
+++ /dev/null
@@ -1,150 +0,0 @@
-# encoding: utf-8
-import datetime
-from south.db import db
-from south.v2 import SchemaMigration
-from django.db import models
-
-class Migration(SchemaMigration):
-
- def forwards(self, orm):
-
- # Adding field 'Book.daisy_file'
- db.add_column('catalogue_book', 'daisy_file', self.gf('django.db.models.fields.files.FileField')(default='', max_length=100, blank=True), keep_default=False)
-
-
- def backwards(self, orm):
-
- # Deleting field 'Book.daisy_file'
- db.delete_column('catalogue_book', 'daisy_file')
-
-
- models = {
- 'auth.group': {
- 'Meta': {'object_name': 'Group'},
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),
- 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
- },
- 'auth.permission': {
- 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'},
- 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
- 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
- },
- 'auth.user': {
- 'Meta': {'object_name': 'User'},
- 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
- 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
- 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
- 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
- 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
- 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
- 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
- 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
- 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
- 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}),
- 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})
- },
- 'catalogue.book': {
- 'Meta': {'ordering': "('title',)", 'object_name': 'Book'},
- '_short_html': ('django.db.models.fields.TextField', [], {}),
- '_short_html_de': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_en': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_es': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_fr': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_lt': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_pl': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_ru': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_uk': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_tag_counter': ('catalogue.fields.JSONField', [], {'null': 'True'}),
- '_theme_counter': ('catalogue.fields.JSONField', [], {'null': 'True'}),
- 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
- 'daisy_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'}),
- 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
- 'epub_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'}),
- 'extra_info': ('catalogue.fields.JSONField', [], {}),
- 'gazeta_link': ('django.db.models.fields.CharField', [], {'max_length': '240', 'blank': 'True'}),
- 'html_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'mp3_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'}),
- 'odt_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'}),
- 'ogg_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'}),
- 'parent': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'children'", 'null': 'True', 'to': "orm['catalogue.Book']"}),
- 'parent_number': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
- 'pdf_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'}),
- 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '120', 'db_index': 'True'}),
- 'title': ('django.db.models.fields.CharField', [], {'max_length': '120'}),
- 'txt_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'}),
- 'wiki_link': ('django.db.models.fields.CharField', [], {'max_length': '240', 'blank': 'True'}),
- 'xml_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'})
- },
- 'catalogue.bookstub': {
- 'Meta': {'ordering': "('title',)", 'object_name': 'BookStub'},
- 'author': ('django.db.models.fields.CharField', [], {'max_length': '120'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'pd': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}),
- 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '120', 'db_index': 'True'}),
- 'title': ('django.db.models.fields.CharField', [], {'max_length': '120'}),
- 'translator': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
- 'translator_death': ('django.db.models.fields.TextField', [], {'blank': 'True'})
- },
- 'catalogue.filerecord': {
- 'Meta': {'ordering': "('-time', '-slug', '-type')", 'object_name': 'FileRecord'},
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'sha1': ('django.db.models.fields.CharField', [], {'max_length': '40'}),
- 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '120', 'db_index': 'True'}),
- 'time': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
- 'type': ('django.db.models.fields.CharField', [], {'max_length': '20', 'db_index': 'True'})
- },
- 'catalogue.fragment': {
- 'Meta': {'ordering': "('book', 'anchor')", 'object_name': 'Fragment'},
- '_short_html': ('django.db.models.fields.TextField', [], {}),
- '_short_html_de': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_en': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_es': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_fr': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_lt': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_pl': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_ru': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_uk': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- 'anchor': ('django.db.models.fields.CharField', [], {'max_length': '120'}),
- 'book': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'fragments'", 'to': "orm['catalogue.Book']"}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'short_text': ('django.db.models.fields.TextField', [], {}),
- 'text': ('django.db.models.fields.TextField', [], {})
- },
- 'catalogue.tag': {
- 'Meta': {'ordering': "('sort_key',)", 'unique_together': "(('slug', 'category'),)", 'object_name': 'Tag'},
- 'book_count': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
- 'category': ('django.db.models.fields.CharField', [], {'max_length': '50', 'db_index': 'True'}),
- 'death': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}),
- 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
- 'gazeta_link': ('django.db.models.fields.CharField', [], {'max_length': '240', 'blank': 'True'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'main_page': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'db_index': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': '50', 'db_index': 'True'}),
- 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '120', 'db_index': 'True'}),
- 'sort_key': ('django.db.models.fields.SlugField', [], {'max_length': '120', 'db_index': 'True'}),
- 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'blank': 'True'}),
- 'wiki_link': ('django.db.models.fields.CharField', [], {'max_length': '240', 'blank': 'True'})
- },
- 'catalogue.tagrelation': {
- 'Meta': {'unique_together': "(('tag', 'content_type', 'object_id'),)", 'object_name': 'TagRelation', 'db_table': "'catalogue_tag_relation'"},
- 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'object_id': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}),
- 'tag': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'items'", 'to': "orm['catalogue.Tag']"})
- },
- 'contenttypes.contenttype': {
- 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
- 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
- }
- }
-
- complete_apps = ['catalogue']
diff --git a/apps/catalogue/migrations/0003_auto__chg_field_book_created_at.py b/apps/catalogue/migrations/0003_auto__chg_field_book_created_at.py
deleted file mode 100644
index dc53778ce..000000000
--- a/apps/catalogue/migrations/0003_auto__chg_field_book_created_at.py
+++ /dev/null
@@ -1,150 +0,0 @@
-# encoding: utf-8
-import datetime
-from south.db import db
-from south.v2 import SchemaMigration
-from django.db import models
-
-class Migration(SchemaMigration):
-
- def forwards(self, orm):
-
- # Changing field 'Book.created_at'
- db.alter_column('catalogue_book', 'created_at', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True))
-
-
- def backwards(self, orm):
-
- # Changing field 'Book.created_at'
- db.alter_column('catalogue_book', 'created_at', self.gf('django.db.models.fields.DateTimeField')(auto_now=True))
-
-
- models = {
- 'auth.group': {
- 'Meta': {'object_name': 'Group'},
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': '80', 'unique': 'True'}),
- 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
- },
- 'auth.permission': {
- 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'},
- 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
- 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
- },
- 'auth.user': {
- 'Meta': {'object_name': 'User'},
- 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
- 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
- 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
- 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
- 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
- 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
- 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
- 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
- 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
- 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}),
- 'username': ('django.db.models.fields.CharField', [], {'max_length': '30', 'unique': 'True'})
- },
- 'catalogue.book': {
- 'Meta': {'ordering': "('title',)", 'object_name': 'Book'},
- '_short_html': ('django.db.models.fields.TextField', [], {}),
- '_short_html_de': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_en': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_es': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_fr': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_lt': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_pl': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_ru': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_uk': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_tag_counter': ('catalogue.fields.JSONField', [], {'null': 'True'}),
- '_theme_counter': ('catalogue.fields.JSONField', [], {'null': 'True'}),
- 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
- 'daisy_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'}),
- 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
- 'epub_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'}),
- 'extra_info': ('catalogue.fields.JSONField', [], {}),
- 'gazeta_link': ('django.db.models.fields.CharField', [], {'max_length': '240', 'blank': 'True'}),
- 'html_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'mp3_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'}),
- 'odt_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'}),
- 'ogg_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'}),
- 'parent': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'children'", 'blank': 'True', 'null': 'True', 'to': "orm['catalogue.Book']"}),
- 'parent_number': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
- 'pdf_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'}),
- 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '120', 'unique': 'True', 'db_index': 'True'}),
- 'title': ('django.db.models.fields.CharField', [], {'max_length': '120'}),
- 'txt_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'}),
- 'wiki_link': ('django.db.models.fields.CharField', [], {'max_length': '240', 'blank': 'True'}),
- 'xml_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'})
- },
- 'catalogue.bookstub': {
- 'Meta': {'ordering': "('title',)", 'object_name': 'BookStub'},
- 'author': ('django.db.models.fields.CharField', [], {'max_length': '120'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'pd': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}),
- 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '120', 'unique': 'True', 'db_index': 'True'}),
- 'title': ('django.db.models.fields.CharField', [], {'max_length': '120'}),
- 'translator': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
- 'translator_death': ('django.db.models.fields.TextField', [], {'blank': 'True'})
- },
- 'catalogue.filerecord': {
- 'Meta': {'ordering': "('-time', '-slug', '-type')", 'object_name': 'FileRecord'},
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'sha1': ('django.db.models.fields.CharField', [], {'max_length': '40'}),
- 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '120', 'db_index': 'True'}),
- 'time': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
- 'type': ('django.db.models.fields.CharField', [], {'max_length': '20', 'db_index': 'True'})
- },
- 'catalogue.fragment': {
- 'Meta': {'ordering': "('book', 'anchor')", 'object_name': 'Fragment'},
- '_short_html': ('django.db.models.fields.TextField', [], {}),
- '_short_html_de': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_en': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_es': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_fr': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_lt': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_pl': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_ru': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_uk': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- 'anchor': ('django.db.models.fields.CharField', [], {'max_length': '120'}),
- 'book': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'fragments'", 'to': "orm['catalogue.Book']"}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'short_text': ('django.db.models.fields.TextField', [], {}),
- 'text': ('django.db.models.fields.TextField', [], {})
- },
- 'catalogue.tag': {
- 'Meta': {'ordering': "('sort_key',)", 'unique_together': "(('slug', 'category'),)", 'object_name': 'Tag'},
- 'book_count': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
- 'category': ('django.db.models.fields.CharField', [], {'max_length': '50', 'db_index': 'True'}),
- 'death': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}),
- 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
- 'gazeta_link': ('django.db.models.fields.CharField', [], {'max_length': '240', 'blank': 'True'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'main_page': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'db_index': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': '50', 'db_index': 'True'}),
- 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '120', 'db_index': 'True'}),
- 'sort_key': ('django.db.models.fields.SlugField', [], {'max_length': '120', 'db_index': 'True'}),
- 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'blank': 'True'}),
- 'wiki_link': ('django.db.models.fields.CharField', [], {'max_length': '240', 'blank': 'True'})
- },
- 'catalogue.tagrelation': {
- 'Meta': {'unique_together': "(('tag', 'content_type', 'object_id'),)", 'object_name': 'TagRelation', 'db_table': "'catalogue_tag_relation'"},
- 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'object_id': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}),
- 'tag': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'items'", 'to': "orm['catalogue.Tag']"})
- },
- 'contenttypes.contenttype': {
- 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
- 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
- }
- }
-
- complete_apps = ['catalogue']
diff --git a/apps/catalogue/migrations/0004_auto__chg_field_tag_sort_key.py b/apps/catalogue/migrations/0004_auto__chg_field_tag_sort_key.py
deleted file mode 100644
index 557158ac5..000000000
--- a/apps/catalogue/migrations/0004_auto__chg_field_tag_sort_key.py
+++ /dev/null
@@ -1,168 +0,0 @@
-# encoding: utf-8
-import datetime
-from south.db import db
-from south.v2 import SchemaMigration
-from django.db import models
-
-class Migration(SchemaMigration):
-
- def forwards(self, orm):
-
- # Changing field 'Tag.sort_key'
- db.alter_column('catalogue_tag', 'sort_key', self.gf('django.db.models.fields.CharField')(max_length=120))
-
- if not db.dry_run:
- for tag in orm.Tag.objects.exclude(category__in=('set', 'author')):
- tag.sort_key = tag.name.lower()
- tag.save()
- for tag in orm.Tag.objects.filter(category='author'):
- tag.sort_key = tag.name[-len(tag.sort_key):].lower()
- tag.save()
-
-
-
- def backwards(self, orm):
- # slugify all sort_keys
- if not db.dry_run:
- try:
- from slughifi import slughifi as slugify
- except ImportError:
- from django.template.defaultfilters import slugify
- for tag in orm.Tag.objects.all():
- tag.sort_key = slugify(tag.sort_key)
- tag.save()
-
- # Changing field 'Tag.sort_key'
- db.alter_column('catalogue_tag', 'sort_key', self.gf('django.db.models.fields.SlugField')(max_length=120))
-
-
- models = {
- 'auth.group': {
- 'Meta': {'object_name': 'Group'},
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': '80', 'unique': 'True'}),
- 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
- },
- 'auth.permission': {
- 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'},
- 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
- 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
- },
- 'auth.user': {
- 'Meta': {'object_name': 'User'},
- 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
- 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
- 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
- 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
- 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
- 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
- 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
- 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
- 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
- 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}),
- 'username': ('django.db.models.fields.CharField', [], {'max_length': '30', 'unique': 'True'})
- },
- 'catalogue.book': {
- 'Meta': {'ordering': "('title',)", 'object_name': 'Book'},
- '_short_html': ('django.db.models.fields.TextField', [], {}),
- '_short_html_de': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_en': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_es': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_fr': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_lt': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_pl': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_ru': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_uk': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_tag_counter': ('catalogue.fields.JSONField', [], {'null': 'True'}),
- '_theme_counter': ('catalogue.fields.JSONField', [], {'null': 'True'}),
- 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
- 'daisy_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'}),
- 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
- 'epub_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'}),
- 'extra_info': ('catalogue.fields.JSONField', [], {}),
- 'gazeta_link': ('django.db.models.fields.CharField', [], {'max_length': '240', 'blank': 'True'}),
- 'html_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'mp3_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'}),
- 'odt_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'}),
- 'ogg_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'}),
- 'parent': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'children'", 'blank': 'True', 'null': 'True', 'to': "orm['catalogue.Book']"}),
- 'parent_number': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
- 'pdf_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'}),
- 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '120', 'unique': 'True', 'db_index': 'True'}),
- 'title': ('django.db.models.fields.CharField', [], {'max_length': '120'}),
- 'txt_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'}),
- 'wiki_link': ('django.db.models.fields.CharField', [], {'max_length': '240', 'blank': 'True'}),
- 'xml_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'})
- },
- 'catalogue.bookstub': {
- 'Meta': {'ordering': "('title',)", 'object_name': 'BookStub'},
- 'author': ('django.db.models.fields.CharField', [], {'max_length': '120'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'pd': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}),
- 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '120', 'unique': 'True', 'db_index': 'True'}),
- 'title': ('django.db.models.fields.CharField', [], {'max_length': '120'}),
- 'translator': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
- 'translator_death': ('django.db.models.fields.TextField', [], {'blank': 'True'})
- },
- 'catalogue.filerecord': {
- 'Meta': {'ordering': "('-time', '-slug', '-type')", 'object_name': 'FileRecord'},
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'sha1': ('django.db.models.fields.CharField', [], {'max_length': '40'}),
- 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '120', 'db_index': 'True'}),
- 'time': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
- 'type': ('django.db.models.fields.CharField', [], {'max_length': '20', 'db_index': 'True'})
- },
- 'catalogue.fragment': {
- 'Meta': {'ordering': "('book', 'anchor')", 'object_name': 'Fragment'},
- '_short_html': ('django.db.models.fields.TextField', [], {}),
- '_short_html_de': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_en': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_es': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_fr': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_lt': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_pl': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_ru': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_uk': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- 'anchor': ('django.db.models.fields.CharField', [], {'max_length': '120'}),
- 'book': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'fragments'", 'to': "orm['catalogue.Book']"}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'short_text': ('django.db.models.fields.TextField', [], {}),
- 'text': ('django.db.models.fields.TextField', [], {})
- },
- 'catalogue.tag': {
- 'Meta': {'ordering': "('sort_key',)", 'unique_together': "(('slug', 'category'),)", 'object_name': 'Tag'},
- 'book_count': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
- 'category': ('django.db.models.fields.CharField', [], {'max_length': '50', 'db_index': 'True'}),
- 'death': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}),
- 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
- 'gazeta_link': ('django.db.models.fields.CharField', [], {'max_length': '240', 'blank': 'True'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'main_page': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'db_index': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': '50', 'db_index': 'True'}),
- 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '120', 'db_index': 'True'}),
- 'sort_key': ('django.db.models.fields.CharField', [], {'max_length': '120', 'db_index': 'True'}),
- 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'blank': 'True'}),
- 'wiki_link': ('django.db.models.fields.CharField', [], {'max_length': '240', 'blank': 'True'})
- },
- 'catalogue.tagrelation': {
- 'Meta': {'unique_together': "(('tag', 'content_type', 'object_id'),)", 'object_name': 'TagRelation', 'db_table': "'catalogue_tag_relation'"},
- 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'object_id': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}),
- 'tag': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'items'", 'to': "orm['catalogue.Tag']"})
- },
- 'contenttypes.contenttype': {
- 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
- 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
- }
- }
-
- complete_apps = ['catalogue']
diff --git a/apps/catalogue/migrations/0005_many2many_files_for_books.py b/apps/catalogue/migrations/0005_many2many_files_for_books.py
deleted file mode 100644
index 0af3cba0a..000000000
--- a/apps/catalogue/migrations/0005_many2many_files_for_books.py
+++ /dev/null
@@ -1,272 +0,0 @@
-# encoding: utf-8
-import datetime
-from south.db import db
-from south.v2 import SchemaMigration
-from django.db import models
-from django.utils import simplejson as json
-from mutagen import id3
-
-
-def get_mp3_info(file):
- """Retrieves artist and director names from audio ID3 tags."""
- try:
- audio = id3.ID3(file.path)
- artist_name = ', '.join(', '.join(tag.text) for tag in audio.getall('TPE1'))
- director_name = ', '.join(', '.join(tag.text) for tag in audio.getall('TPE3'))
- except:
- artist_name = director_name = ''
- return {'artist_name': artist_name, 'director_name': director_name}
-
-
-class Migration(SchemaMigration):
-
- def forwards(self, orm):
- # Adding model 'BookMedia'
- db.create_table('catalogue_bookmedia', (
- ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
- ('type', self.gf('django.db.models.fields.CharField')(max_length='100')),
- ('name', self.gf('django.db.models.fields.CharField')(max_length='100', blank=True)),
- ('file', self.gf('django.db.models.fields.files.FileField')(max_length=100, blank=True)),
- ('uploaded_at', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, blank=True)),
- ('extra_info', self.gf('catalogue.fields.JSONField')(default='{}')),
- ))
- db.send_create_signal('catalogue', ['BookMedia'])
-
- # Adding M2M table for field medias on 'Book'
- db.create_table('catalogue_book_medias', (
- ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)),
- ('book', models.ForeignKey(orm['catalogue.book'], null=False)),
- ('bookmedia', models.ForeignKey(orm['catalogue.bookmedia'], null=False))
- ))
- db.create_unique('catalogue_book_medias', ['book_id', 'bookmedia_id'])
-
- # Data migration
- if not db.dry_run:
- jsonencoder = json.JSONEncoder()
- for book in orm['old.book'].objects.all():
- medias = []
- if book.odt_file:
- medias.append({"file": book.odt_file, "type": "odt"})
- if book.daisy_file:
- medias.append({"file": book.daisy_file, "type": "daisy"})
- if book.ogg_file:
- medias.append({"file": book.ogg_file, "type": "ogg"})
- if book.mp3_file:
- medias.append({"file": book.mp3_file, "type": "mp3"})
- newbook = orm.Book.objects.get(pk=book.pk)
- for media in medias:
- name = book.title
- bookMedia = orm.BookMedia.objects.create(file=media['file'], type=media['type'], name=name)
- if bookMedia.type == 'mp3':
- bookMedia.extra_info = jsonencoder.encode(get_mp3_info(bookMedia.file))
- bookMedia.save()
- newbook.medias.add(bookMedia)
-
- # Deleting field 'Book.odt_file'
- db.delete_column('catalogue_book', 'odt_file')
-
- # Deleting field 'Book.daisy_file'
- db.delete_column('catalogue_book', 'daisy_file')
-
- # Deleting field 'Book.ogg_file'
- db.delete_column('catalogue_book', 'ogg_file')
-
- # Deleting field 'Book.mp3_file'
- db.delete_column('catalogue_book', 'mp3_file')
-
- # Changing field 'Tag.main_page'
- db.alter_column('catalogue_tag', 'main_page', self.gf('django.db.models.fields.BooleanField')(blank=True))
-
-
- def backwards(self, orm):
- # Deleting model 'BookMedia'
- db.delete_table('catalogue_bookmedia')
-
- # Adding field 'Book.odt_file'
- db.add_column('catalogue_book', 'odt_file', self.gf('django.db.models.fields.files.FileField')(default='', max_length=100, blank=True), keep_default=False)
-
- # Adding field 'Book.daisy_file'
- db.add_column('catalogue_book', 'daisy_file', self.gf('django.db.models.fields.files.FileField')(default='', max_length=100, blank=True), keep_default=False)
-
- # Adding field 'Book.ogg_file'
- db.add_column('catalogue_book', 'ogg_file', self.gf('django.db.models.fields.files.FileField')(default='', max_length=100, blank=True), keep_default=False)
-
- # Adding field 'Book.mp3_file'
- db.add_column('catalogue_book', 'mp3_file', self.gf('django.db.models.fields.files.FileField')(default='', max_length=100, blank=True), keep_default=False)
-
- # Removing M2M table for field medias on 'Book'
- db.delete_table('catalogue_book_medias')
-
- # Changing field 'Tag.main_page'
- db.alter_column('catalogue_tag', 'main_page', self.gf('django.db.models.fields.BooleanField')())
-
-
- models = {
- 'auth.group': {
- 'Meta': {'object_name': 'Group'},
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': '80', 'unique': 'True'}),
- 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
- },
- 'auth.permission': {
- 'Meta': {'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'},
- 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
- 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
- },
- 'auth.user': {
- 'Meta': {'object_name': 'User'},
- 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
- 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
- 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
- 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'blank': 'True'}),
- 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
- 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
- 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
- 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
- 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
- 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}),
- 'username': ('django.db.models.fields.CharField', [], {'max_length': '30', 'unique': 'True'})
- },
- 'catalogue.book': {
- 'Meta': {'object_name': 'Book'},
- '_short_html': ('django.db.models.fields.TextField', [], {}),
- '_short_html_de': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_en': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_es': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_fr': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_lt': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_pl': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_ru': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_uk': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_tag_counter': ('catalogue.fields.JSONField', [], {'null': 'True'}),
- '_theme_counter': ('catalogue.fields.JSONField', [], {'null': 'True'}),
- 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
- 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
- 'epub_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'}),
- 'extra_info': ('catalogue.fields.JSONField', [], {}),
- 'gazeta_link': ('django.db.models.fields.CharField', [], {'max_length': '240', 'blank': 'True'}),
- 'html_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'medias': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['catalogue.BookMedia']", 'symmetrical': 'False'}),
- 'parent': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'children'", 'blank': 'True', 'null': 'True', 'to': "orm['catalogue.Book']"}),
- 'parent_number': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
- 'pdf_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'}),
- 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '120', 'unique': 'True', 'db_index': 'True'}),
- 'title': ('django.db.models.fields.CharField', [], {'max_length': '120'}),
- 'txt_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'}),
- 'wiki_link': ('django.db.models.fields.CharField', [], {'max_length': '240', 'blank': 'True'}),
- 'xml_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'})
- },
- 'catalogue.bookmedia': {
- 'Meta': {'object_name': 'BookMedia'},
- 'extra_info': ('catalogue.fields.JSONField', [], {'default': "'{}'"}),
- 'file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': "'100'"}),
- 'type': ('django.db.models.fields.CharField', [], {'max_length': "'100'"}),
- 'uploaded_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'})
- },
- 'catalogue.bookstub': {
- 'Meta': {'object_name': 'BookStub'},
- 'author': ('django.db.models.fields.CharField', [], {'max_length': '120'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'pd': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}),
- 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '120', 'unique': 'True', 'db_index': 'True'}),
- 'title': ('django.db.models.fields.CharField', [], {'max_length': '120'}),
- 'translator': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
- 'translator_death': ('django.db.models.fields.TextField', [], {'blank': 'True'})
- },
- 'catalogue.filerecord': {
- 'Meta': {'object_name': 'FileRecord'},
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'sha1': ('django.db.models.fields.CharField', [], {'max_length': '40'}),
- 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '120', 'db_index': 'True'}),
- 'time': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
- 'type': ('django.db.models.fields.CharField', [], {'max_length': '20', 'db_index': 'True'})
- },
- 'catalogue.fragment': {
- 'Meta': {'object_name': 'Fragment'},
- '_short_html': ('django.db.models.fields.TextField', [], {}),
- '_short_html_de': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_en': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_es': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_fr': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_lt': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_pl': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_ru': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_uk': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- 'anchor': ('django.db.models.fields.CharField', [], {'max_length': '120'}),
- 'book': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'fragments'", 'to': "orm['catalogue.Book']"}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'short_text': ('django.db.models.fields.TextField', [], {}),
- 'text': ('django.db.models.fields.TextField', [], {})
- },
- 'catalogue.tag': {
- 'Meta': {'unique_together': "(('slug', 'category'),)", 'object_name': 'Tag'},
- 'book_count': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
- 'category': ('django.db.models.fields.CharField', [], {'max_length': '50', 'db_index': 'True'}),
- 'death': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}),
- 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
- 'gazeta_link': ('django.db.models.fields.CharField', [], {'max_length': '240', 'blank': 'True'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'main_page': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'db_index': 'True', 'blank': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': '50', 'db_index': 'True'}),
- 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '120', 'db_index': 'True'}),
- 'sort_key': ('django.db.models.fields.CharField', [], {'max_length': '120', 'db_index': 'True'}),
- 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'blank': 'True'}),
- 'wiki_link': ('django.db.models.fields.CharField', [], {'max_length': '240', 'blank': 'True'})
- },
- 'catalogue.tagrelation': {
- 'Meta': {'unique_together': "(('tag', 'content_type', 'object_id'),)", 'object_name': 'TagRelation', 'db_table': "'catalogue_tag_relation'"},
- 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'object_id': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}),
- 'tag': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'items'", 'to': "orm['catalogue.Tag']"})
- },
- 'contenttypes.contenttype': {
- 'Meta': {'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
- 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
- },
- 'old.book': {
- 'Meta': {'ordering': "('title',)", 'object_name': 'Book', 'db_table': "'catalogue_book'"},
- '_short_html': ('django.db.models.fields.TextField', [], {}),
- '_short_html_de': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_en': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_es': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_fr': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_lt': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_pl': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_ru': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_uk': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_tag_counter': ('catalogue.fields.JSONField', [], {'null': 'True'}),
- '_theme_counter': ('catalogue.fields.JSONField', [], {'null': 'True'}),
- 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
- 'daisy_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'}),
- 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
- 'epub_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'}),
- 'extra_info': ('catalogue.fields.JSONField', [], {}),
- 'gazeta_link': ('django.db.models.fields.CharField', [], {'max_length': '240', 'blank': 'True'}),
- 'html_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'mp3_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'}),
- 'odt_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'}),
- 'ogg_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'}),
- 'parent': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'children'", 'blank': 'True', 'null': 'True', 'to': "orm['catalogue.Book']"}),
- 'parent_number': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
- 'pdf_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'}),
- 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '120', 'unique': 'True', 'db_index': 'True'}),
- 'title': ('django.db.models.fields.CharField', [], {'max_length': '120'}),
- 'txt_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'}),
- 'wiki_link': ('django.db.models.fields.CharField', [], {'max_length': '240', 'blank': 'True'}),
- 'xml_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'})
- }
- }
-
- complete_apps = ['catalogue']
diff --git a/apps/catalogue/migrations/0006_auto__del_bookstub__del_field_tag_death.py b/apps/catalogue/migrations/0006_auto__del_bookstub__del_field_tag_death.py
deleted file mode 100644
index 5abf27e65..000000000
--- a/apps/catalogue/migrations/0006_auto__del_bookstub__del_field_tag_death.py
+++ /dev/null
@@ -1,160 +0,0 @@
-# encoding: utf-8
-import datetime
-from south.db import db
-from south.v2 import SchemaMigration
-from django.db import models
-
-class Migration(SchemaMigration):
-
- def forwards(self, orm):
-
- # Deleting model 'BookStub'
- db.delete_table('catalogue_bookstub')
-
- # Deleting field 'Tag.death'
- db.delete_column('catalogue_tag', 'death')
-
-
- def backwards(self, orm):
-
- # Adding model 'BookStub'
- db.create_table('catalogue_bookstub', (
- ('title', self.gf('django.db.models.fields.CharField')(max_length=120)),
- ('author', self.gf('django.db.models.fields.CharField')(max_length=120)),
- ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
- ('translator', self.gf('django.db.models.fields.TextField')(blank=True)),
- ('translator_death', self.gf('django.db.models.fields.TextField')(blank=True)),
- ('pd', self.gf('django.db.models.fields.IntegerField')(null=True, blank=True)),
- ('slug', self.gf('django.db.models.fields.SlugField')(unique=True, max_length=120, db_index=True)),
- ))
- db.send_create_signal('catalogue', ['BookStub'])
-
- # Adding field 'Tag.death'
- db.add_column('catalogue_tag', 'death', self.gf('django.db.models.fields.IntegerField')(null=True, blank=True), keep_default=False)
-
-
- models = {
- 'auth.group': {
- 'Meta': {'object_name': 'Group'},
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': '80', 'unique': 'True'}),
- 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
- },
- 'auth.permission': {
- 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'},
- 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
- 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
- },
- 'auth.user': {
- 'Meta': {'object_name': 'User'},
- 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
- 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
- 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
- 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
- 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
- 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
- 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
- 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
- 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
- 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}),
- 'username': ('django.db.models.fields.CharField', [], {'max_length': '30', 'unique': 'True'})
- },
- 'catalogue.book': {
- 'Meta': {'ordering': "('title',)", 'object_name': 'Book'},
- '_short_html': ('django.db.models.fields.TextField', [], {}),
- '_short_html_de': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_en': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_es': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_fr': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_lt': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_pl': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_ru': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_uk': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_tag_counter': ('catalogue.fields.JSONField', [], {'null': 'True'}),
- '_theme_counter': ('catalogue.fields.JSONField', [], {'null': 'True'}),
- 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
- 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
- 'epub_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'}),
- 'extra_info': ('catalogue.fields.JSONField', [], {}),
- 'gazeta_link': ('django.db.models.fields.CharField', [], {'max_length': '240', 'blank': 'True'}),
- 'html_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'medias': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['catalogue.BookMedia']", 'symmetrical': 'False', 'blank': 'True'}),
- 'parent': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'children'", 'blank': 'True', 'null': 'True', 'to': "orm['catalogue.Book']"}),
- 'parent_number': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
- 'pdf_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'}),
- 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '120', 'unique': 'True', 'db_index': 'True'}),
- 'title': ('django.db.models.fields.CharField', [], {'max_length': '120'}),
- 'txt_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'}),
- 'wiki_link': ('django.db.models.fields.CharField', [], {'max_length': '240', 'blank': 'True'}),
- 'xml_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'})
- },
- 'catalogue.bookmedia': {
- 'Meta': {'ordering': "('type', 'name')", 'object_name': 'BookMedia'},
- 'extra_info': ('catalogue.fields.JSONField', [], {'default': "'{}'"}),
- 'file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': "'100'", 'blank': 'True'}),
- 'type': ('django.db.models.fields.CharField', [], {'max_length': "'100'"}),
- 'uploaded_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'})
- },
- 'catalogue.filerecord': {
- 'Meta': {'ordering': "('-time', '-slug', '-type')", 'object_name': 'FileRecord'},
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'sha1': ('django.db.models.fields.CharField', [], {'max_length': '40'}),
- 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '120', 'db_index': 'True'}),
- 'time': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
- 'type': ('django.db.models.fields.CharField', [], {'max_length': '20', 'db_index': 'True'})
- },
- 'catalogue.fragment': {
- 'Meta': {'ordering': "('book', 'anchor')", 'object_name': 'Fragment'},
- '_short_html': ('django.db.models.fields.TextField', [], {}),
- '_short_html_de': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_en': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_es': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_fr': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_lt': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_pl': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_ru': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_uk': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- 'anchor': ('django.db.models.fields.CharField', [], {'max_length': '120'}),
- 'book': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'fragments'", 'to': "orm['catalogue.Book']"}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'short_text': ('django.db.models.fields.TextField', [], {}),
- 'text': ('django.db.models.fields.TextField', [], {})
- },
- 'catalogue.tag': {
- 'Meta': {'ordering': "('sort_key',)", 'unique_together': "(('slug', 'category'),)", 'object_name': 'Tag'},
- 'book_count': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
- 'category': ('django.db.models.fields.CharField', [], {'max_length': '50', 'db_index': 'True'}),
- 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
- 'gazeta_link': ('django.db.models.fields.CharField', [], {'max_length': '240', 'blank': 'True'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'main_page': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'db_index': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': '50', 'db_index': 'True'}),
- 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '120', 'db_index': 'True'}),
- 'sort_key': ('django.db.models.fields.CharField', [], {'max_length': '120', 'db_index': 'True'}),
- 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'blank': 'True'}),
- 'wiki_link': ('django.db.models.fields.CharField', [], {'max_length': '240', 'blank': 'True'})
- },
- 'catalogue.tagrelation': {
- 'Meta': {'unique_together': "(('tag', 'content_type', 'object_id'),)", 'object_name': 'TagRelation', 'db_table': "'catalogue_tag_relation'"},
- 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'object_id': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}),
- 'tag': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'items'", 'to': "orm['catalogue.Tag']"})
- },
- 'contenttypes.contenttype': {
- 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
- 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
- }
- }
-
- complete_apps = ['catalogue']
diff --git a/apps/catalogue/migrations/0007_auto__add_field_bookmedia_book.py b/apps/catalogue/migrations/0007_auto__add_field_bookmedia_book.py
deleted file mode 100644
index e48ef25dc..000000000
--- a/apps/catalogue/migrations/0007_auto__add_field_bookmedia_book.py
+++ /dev/null
@@ -1,146 +0,0 @@
-# encoding: utf-8
-import datetime
-from south.db import db
-from south.v2 import SchemaMigration
-from django.db import models
-
-class Migration(SchemaMigration):
-
- def forwards(self, orm):
-
- # Adding field 'BookMedia.book'
- db.add_column('catalogue_bookmedia', 'book', self.gf('django.db.models.fields.related.ForeignKey')(related_name='media', null=True, to=orm['catalogue.Book']), keep_default=False)
-
-
- def backwards(self, orm):
-
- # Deleting field 'BookMedia.book'
- db.delete_column('catalogue_bookmedia', 'book_id')
-
-
- models = {
- 'auth.group': {
- 'Meta': {'object_name': 'Group'},
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': '80', 'unique': 'True'}),
- 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
- },
- 'auth.permission': {
- 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'},
- 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
- 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
- },
- 'auth.user': {
- 'Meta': {'object_name': 'User'},
- 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
- 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
- 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
- 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
- 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
- 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
- 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
- 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
- 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
- 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}),
- 'username': ('django.db.models.fields.CharField', [], {'max_length': '30', 'unique': 'True'})
- },
- 'catalogue.book': {
- 'Meta': {'ordering': "('title',)", 'object_name': 'Book'},
- '_short_html': ('django.db.models.fields.TextField', [], {}),
- '_short_html_de': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_en': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_es': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_fr': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_lt': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_pl': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_ru': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_uk': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_tag_counter': ('catalogue.fields.JSONField', [], {'null': 'True'}),
- '_theme_counter': ('catalogue.fields.JSONField', [], {'null': 'True'}),
- 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
- 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
- 'epub_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'}),
- 'extra_info': ('catalogue.fields.JSONField', [], {}),
- 'gazeta_link': ('django.db.models.fields.CharField', [], {'max_length': '240', 'blank': 'True'}),
- 'html_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'medias': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "'book_set'", 'blank': 'True', 'to': "orm['catalogue.BookMedia']"}),
- 'parent': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'children'", 'blank': 'True', 'null': 'True', 'to': "orm['catalogue.Book']"}),
- 'parent_number': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
- 'pdf_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'}),
- 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '120', 'unique': 'True', 'db_index': 'True'}),
- 'title': ('django.db.models.fields.CharField', [], {'max_length': '120'}),
- 'txt_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'}),
- 'wiki_link': ('django.db.models.fields.CharField', [], {'max_length': '240', 'blank': 'True'}),
- 'xml_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'})
- },
- 'catalogue.bookmedia': {
- 'Meta': {'ordering': "('type', 'name')", 'object_name': 'BookMedia'},
- 'book': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'media'", 'null': 'True', 'to': "orm['catalogue.Book']"}),
- 'extra_info': ('catalogue.fields.JSONField', [], {'default': "'{}'"}),
- 'file': ('django.db.models.fields.files.FileField', [], {'max_length': '100'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': "'100'"}),
- 'type': ('django.db.models.fields.CharField', [], {'max_length': "'100'"}),
- 'uploaded_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'})
- },
- 'catalogue.filerecord': {
- 'Meta': {'ordering': "('-time', '-slug', '-type')", 'object_name': 'FileRecord'},
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'sha1': ('django.db.models.fields.CharField', [], {'max_length': '40'}),
- 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '120', 'db_index': 'True'}),
- 'time': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
- 'type': ('django.db.models.fields.CharField', [], {'max_length': '20', 'db_index': 'True'})
- },
- 'catalogue.fragment': {
- 'Meta': {'ordering': "('book', 'anchor')", 'object_name': 'Fragment'},
- '_short_html': ('django.db.models.fields.TextField', [], {}),
- '_short_html_de': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_en': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_es': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_fr': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_lt': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_pl': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_ru': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_uk': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- 'anchor': ('django.db.models.fields.CharField', [], {'max_length': '120'}),
- 'book': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'fragments'", 'to': "orm['catalogue.Book']"}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'short_text': ('django.db.models.fields.TextField', [], {}),
- 'text': ('django.db.models.fields.TextField', [], {})
- },
- 'catalogue.tag': {
- 'Meta': {'ordering': "('sort_key',)", 'unique_together': "(('slug', 'category'),)", 'object_name': 'Tag'},
- 'book_count': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}),
- 'category': ('django.db.models.fields.CharField', [], {'max_length': '50', 'db_index': 'True'}),
- 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
- 'gazeta_link': ('django.db.models.fields.CharField', [], {'max_length': '240', 'blank': 'True'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'main_page': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'db_index': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': '50', 'db_index': 'True'}),
- 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '120', 'db_index': 'True'}),
- 'sort_key': ('django.db.models.fields.CharField', [], {'max_length': '120', 'db_index': 'True'}),
- 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'blank': 'True'}),
- 'wiki_link': ('django.db.models.fields.CharField', [], {'max_length': '240', 'blank': 'True'})
- },
- 'catalogue.tagrelation': {
- 'Meta': {'unique_together': "(('tag', 'content_type', 'object_id'),)", 'object_name': 'TagRelation', 'db_table': "'catalogue_tag_relation'"},
- 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'object_id': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}),
- 'tag': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'items'", 'to': "orm['catalogue.Tag']"})
- },
- 'contenttypes.contenttype': {
- 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
- 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
- }
- }
-
- complete_apps = ['catalogue']
diff --git a/apps/catalogue/migrations/0008_move_media.py b/apps/catalogue/migrations/0008_move_media.py
deleted file mode 100644
index 7428dea54..000000000
--- a/apps/catalogue/migrations/0008_move_media.py
+++ /dev/null
@@ -1,148 +0,0 @@
-# encoding: utf-8
-import datetime
-from south.db import db
-from south.v2 import DataMigration
-from django.db import models
-
-class Migration(DataMigration):
-
- def forwards(self, orm):
- for media in orm.BookMedia.objects.all():
- try:
- media.book = media.book_set.all()[0]
- media.save()
- except IndexError, e:
- media.delete()
-
-
- def backwards(self, orm):
- for media in orm.BookMedia.objects.all():
- media.book_set = [media.book]
-
-
- models = {
- 'auth.group': {
- 'Meta': {'object_name': 'Group'},
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': '80', 'unique': 'True'}),
- 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
- },
- 'auth.permission': {
- 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'},
- 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
- 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
- },
- 'auth.user': {
- 'Meta': {'object_name': 'User'},
- 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
- 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
- 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
- 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
- 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
- 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
- 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
- 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
- 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
- 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}),
- 'username': ('django.db.models.fields.CharField', [], {'max_length': '30', 'unique': 'True'})
- },
- 'catalogue.book': {
- 'Meta': {'ordering': "('title',)", 'object_name': 'Book'},
- '_short_html': ('django.db.models.fields.TextField', [], {}),
- '_short_html_de': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_en': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_es': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_fr': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_lt': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_pl': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_ru': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_uk': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_tag_counter': ('catalogue.fields.JSONField', [], {'null': 'True'}),
- '_theme_counter': ('catalogue.fields.JSONField', [], {'null': 'True'}),
- 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
- 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
- 'epub_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'}),
- 'extra_info': ('catalogue.fields.JSONField', [], {}),
- 'gazeta_link': ('django.db.models.fields.CharField', [], {'max_length': '240', 'blank': 'True'}),
- 'html_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'medias': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "'book_set'", 'blank': 'True', 'to': "orm['catalogue.BookMedia']"}),
- 'parent': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'children'", 'blank': 'True', 'null': 'True', 'to': "orm['catalogue.Book']"}),
- 'parent_number': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
- 'pdf_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'}),
- 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '120', 'unique': 'True', 'db_index': 'True'}),
- 'title': ('django.db.models.fields.CharField', [], {'max_length': '120'}),
- 'txt_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'}),
- 'wiki_link': ('django.db.models.fields.CharField', [], {'max_length': '240', 'blank': 'True'}),
- 'xml_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'})
- },
- 'catalogue.bookmedia': {
- 'Meta': {'ordering': "('type', 'name')", 'object_name': 'BookMedia'},
- 'book': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'media'", 'null': 'True', 'to': "orm['catalogue.Book']"}),
- 'extra_info': ('catalogue.fields.JSONField', [], {'default': "'{}'"}),
- 'file': ('django.db.models.fields.files.FileField', [], {'max_length': '100'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': "'100'"}),
- 'type': ('django.db.models.fields.CharField', [], {'max_length': "'100'"}),
- 'uploaded_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'})
- },
- 'catalogue.filerecord': {
- 'Meta': {'ordering': "('-time', '-slug', '-type')", 'object_name': 'FileRecord'},
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'sha1': ('django.db.models.fields.CharField', [], {'max_length': '40'}),
- 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '120', 'db_index': 'True'}),
- 'time': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
- 'type': ('django.db.models.fields.CharField', [], {'max_length': '20', 'db_index': 'True'})
- },
- 'catalogue.fragment': {
- 'Meta': {'ordering': "('book', 'anchor')", 'object_name': 'Fragment'},
- '_short_html': ('django.db.models.fields.TextField', [], {}),
- '_short_html_de': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_en': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_es': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_fr': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_lt': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_pl': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_ru': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_uk': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- 'anchor': ('django.db.models.fields.CharField', [], {'max_length': '120'}),
- 'book': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'fragments'", 'to': "orm['catalogue.Book']"}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'short_text': ('django.db.models.fields.TextField', [], {}),
- 'text': ('django.db.models.fields.TextField', [], {})
- },
- 'catalogue.tag': {
- 'Meta': {'ordering': "('sort_key',)", 'unique_together': "(('slug', 'category'),)", 'object_name': 'Tag'},
- 'book_count': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}),
- 'category': ('django.db.models.fields.CharField', [], {'max_length': '50', 'db_index': 'True'}),
- 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
- 'gazeta_link': ('django.db.models.fields.CharField', [], {'max_length': '240', 'blank': 'True'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'main_page': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'db_index': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': '50', 'db_index': 'True'}),
- 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '120', 'db_index': 'True'}),
- 'sort_key': ('django.db.models.fields.CharField', [], {'max_length': '120', 'db_index': 'True'}),
- 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'blank': 'True'}),
- 'wiki_link': ('django.db.models.fields.CharField', [], {'max_length': '240', 'blank': 'True'})
- },
- 'catalogue.tagrelation': {
- 'Meta': {'unique_together': "(('tag', 'content_type', 'object_id'),)", 'object_name': 'TagRelation', 'db_table': "'catalogue_tag_relation'"},
- 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'object_id': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}),
- 'tag': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'items'", 'to': "orm['catalogue.Tag']"})
- },
- 'contenttypes.contenttype': {
- 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
- 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
- }
- }
-
- complete_apps = ['catalogue']
diff --git a/apps/catalogue/migrations/0009_auto.py b/apps/catalogue/migrations/0009_auto.py
deleted file mode 100644
index 9c8e5c978..000000000
--- a/apps/catalogue/migrations/0009_auto.py
+++ /dev/null
@@ -1,156 +0,0 @@
-# encoding: utf-8
-import datetime
-from south.db import db
-from south.v2 import SchemaMigration
-from django.db import models
-
-class Migration(SchemaMigration):
-
- def forwards(self, orm):
-
- # Removing M2M table for field medias on 'Book'
- db.delete_table('catalogue_book_medias')
-
- # Changing field 'BookMedia.book'
- db.alter_column('catalogue_bookmedia', 'book_id', self.gf('django.db.models.fields.related.ForeignKey')(default=0, to=orm['catalogue.Book']))
-
-
- def backwards(self, orm):
-
- # Adding M2M table for field medias on 'Book'
- db.create_table('catalogue_book_medias', (
- ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)),
- ('book', models.ForeignKey(orm['catalogue.book'], null=False)),
- ('bookmedia', models.ForeignKey(orm['catalogue.bookmedia'], null=False))
- ))
- db.create_unique('catalogue_book_medias', ['book_id', 'bookmedia_id'])
-
- # Changing field 'BookMedia.book'
- db.alter_column('catalogue_bookmedia', 'book_id', self.gf('django.db.models.fields.related.ForeignKey')(null=True, to=orm['catalogue.Book']))
-
-
- models = {
- 'auth.group': {
- 'Meta': {'object_name': 'Group'},
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': '80', 'unique': 'True'}),
- 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
- },
- 'auth.permission': {
- 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'},
- 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
- 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
- },
- 'auth.user': {
- 'Meta': {'object_name': 'User'},
- 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
- 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
- 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
- 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
- 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
- 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
- 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
- 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
- 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
- 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}),
- 'username': ('django.db.models.fields.CharField', [], {'max_length': '30', 'unique': 'True'})
- },
- 'catalogue.book': {
- 'Meta': {'ordering': "('title',)", 'object_name': 'Book'},
- '_short_html': ('django.db.models.fields.TextField', [], {}),
- '_short_html_de': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_en': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_es': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_fr': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_lt': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_pl': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_ru': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_uk': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_tag_counter': ('catalogue.fields.JSONField', [], {'null': 'True'}),
- '_theme_counter': ('catalogue.fields.JSONField', [], {'null': 'True'}),
- 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
- 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
- 'epub_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'}),
- 'extra_info': ('catalogue.fields.JSONField', [], {}),
- 'gazeta_link': ('django.db.models.fields.CharField', [], {'max_length': '240', 'blank': 'True'}),
- 'html_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'parent': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'children'", 'blank': 'True', 'null': 'True', 'to': "orm['catalogue.Book']"}),
- 'parent_number': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
- 'pdf_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'}),
- 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '120', 'unique': 'True', 'db_index': 'True'}),
- 'title': ('django.db.models.fields.CharField', [], {'max_length': '120'}),
- 'txt_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'}),
- 'wiki_link': ('django.db.models.fields.CharField', [], {'max_length': '240', 'blank': 'True'}),
- 'xml_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'})
- },
- 'catalogue.bookmedia': {
- 'Meta': {'ordering': "('type', 'name')", 'object_name': 'BookMedia'},
- 'book': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'media'", 'to': "orm['catalogue.Book']"}),
- 'extra_info': ('catalogue.fields.JSONField', [], {'default': "'{}'"}),
- 'file': ('django.db.models.fields.files.FileField', [], {'max_length': '100'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': "'100'"}),
- 'type': ('django.db.models.fields.CharField', [], {'max_length': "'100'"}),
- 'uploaded_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'})
- },
- 'catalogue.filerecord': {
- 'Meta': {'ordering': "('-time', '-slug', '-type')", 'object_name': 'FileRecord'},
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'sha1': ('django.db.models.fields.CharField', [], {'max_length': '40'}),
- 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '120', 'db_index': 'True'}),
- 'time': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
- 'type': ('django.db.models.fields.CharField', [], {'max_length': '20', 'db_index': 'True'})
- },
- 'catalogue.fragment': {
- 'Meta': {'ordering': "('book', 'anchor')", 'object_name': 'Fragment'},
- '_short_html': ('django.db.models.fields.TextField', [], {}),
- '_short_html_de': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_en': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_es': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_fr': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_lt': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_pl': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_ru': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_uk': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- 'anchor': ('django.db.models.fields.CharField', [], {'max_length': '120'}),
- 'book': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'fragments'", 'to': "orm['catalogue.Book']"}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'short_text': ('django.db.models.fields.TextField', [], {}),
- 'text': ('django.db.models.fields.TextField', [], {})
- },
- 'catalogue.tag': {
- 'Meta': {'ordering': "('sort_key',)", 'unique_together': "(('slug', 'category'),)", 'object_name': 'Tag'},
- 'book_count': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}),
- 'category': ('django.db.models.fields.CharField', [], {'max_length': '50', 'db_index': 'True'}),
- 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
- 'gazeta_link': ('django.db.models.fields.CharField', [], {'max_length': '240', 'blank': 'True'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'main_page': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'db_index': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': '50', 'db_index': 'True'}),
- 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '120', 'db_index': 'True'}),
- 'sort_key': ('django.db.models.fields.CharField', [], {'max_length': '120', 'db_index': 'True'}),
- 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'blank': 'True'}),
- 'wiki_link': ('django.db.models.fields.CharField', [], {'max_length': '240', 'blank': 'True'})
- },
- 'catalogue.tagrelation': {
- 'Meta': {'unique_together': "(('tag', 'content_type', 'object_id'),)", 'object_name': 'TagRelation', 'db_table': "'catalogue_tag_relation'"},
- 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'object_id': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}),
- 'tag': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'items'", 'to': "orm['catalogue.Tag']"})
- },
- 'contenttypes.contenttype': {
- 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
- 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
- }
- }
-
- complete_apps = ['catalogue']
diff --git a/apps/catalogue/migrations/0010_auto__add_field_bookmedia_source_sha1.py b/apps/catalogue/migrations/0010_auto__add_field_bookmedia_source_sha1.py
deleted file mode 100644
index e53de5539..000000000
--- a/apps/catalogue/migrations/0010_auto__add_field_bookmedia_source_sha1.py
+++ /dev/null
@@ -1,146 +0,0 @@
-# encoding: utf-8
-import datetime
-from south.db import db
-from south.v2 import SchemaMigration
-from django.db import models
-
-class Migration(SchemaMigration):
-
- def forwards(self, orm):
-
- # Adding field 'BookMedia.source_sha1'
- db.add_column('catalogue_bookmedia', 'source_sha1', self.gf('django.db.models.fields.CharField')(max_length=40, null=True, blank=True), keep_default=False)
-
-
- def backwards(self, orm):
-
- # Deleting field 'BookMedia.source_sha1'
- db.delete_column('catalogue_bookmedia', 'source_sha1')
-
-
- models = {
- 'auth.group': {
- 'Meta': {'object_name': 'Group'},
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': '80', 'unique': 'True'}),
- 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
- },
- 'auth.permission': {
- 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'},
- 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
- 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
- },
- 'auth.user': {
- 'Meta': {'object_name': 'User'},
- 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
- 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
- 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
- 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
- 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
- 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
- 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
- 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
- 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
- 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}),
- 'username': ('django.db.models.fields.CharField', [], {'max_length': '30', 'unique': 'True'})
- },
- 'catalogue.book': {
- 'Meta': {'ordering': "('title',)", 'object_name': 'Book'},
- '_short_html': ('django.db.models.fields.TextField', [], {}),
- '_short_html_de': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_en': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_es': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_fr': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_lt': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_pl': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_ru': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_uk': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_tag_counter': ('catalogue.fields.JSONField', [], {'null': 'True'}),
- '_theme_counter': ('catalogue.fields.JSONField', [], {'null': 'True'}),
- 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
- 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
- 'epub_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'}),
- 'extra_info': ('catalogue.fields.JSONField', [], {}),
- 'gazeta_link': ('django.db.models.fields.CharField', [], {'max_length': '240', 'blank': 'True'}),
- 'html_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'parent': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'children'", 'blank': 'True', 'null': 'True', 'to': "orm['catalogue.Book']"}),
- 'parent_number': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
- 'pdf_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'}),
- 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '120', 'unique': 'True', 'db_index': 'True'}),
- 'title': ('django.db.models.fields.CharField', [], {'max_length': '120'}),
- 'txt_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'}),
- 'wiki_link': ('django.db.models.fields.CharField', [], {'max_length': '240', 'blank': 'True'}),
- 'xml_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'})
- },
- 'catalogue.bookmedia': {
- 'Meta': {'ordering': "('type', 'name')", 'object_name': 'BookMedia'},
- 'book': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'media'", 'to': "orm['catalogue.Book']"}),
- 'extra_info': ('catalogue.fields.JSONField', [], {'default': "'{}'"}),
- 'file': ('django.db.models.fields.files.FileField', [], {'max_length': '100'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': "'100'"}),
- 'source_sha1': ('django.db.models.fields.CharField', [], {'max_length': '40', 'null': 'True', 'blank': 'True'}),
- 'type': ('django.db.models.fields.CharField', [], {'max_length': "'100'"}),
- 'uploaded_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'})
- },
- 'catalogue.filerecord': {
- 'Meta': {'ordering': "('-time', '-slug', '-type')", 'object_name': 'FileRecord'},
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'sha1': ('django.db.models.fields.CharField', [], {'max_length': '40'}),
- 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '120', 'db_index': 'True'}),
- 'time': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
- 'type': ('django.db.models.fields.CharField', [], {'max_length': '20', 'db_index': 'True'})
- },
- 'catalogue.fragment': {
- 'Meta': {'ordering': "('book', 'anchor')", 'object_name': 'Fragment'},
- '_short_html': ('django.db.models.fields.TextField', [], {}),
- '_short_html_de': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_en': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_es': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_fr': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_lt': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_pl': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_ru': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_uk': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- 'anchor': ('django.db.models.fields.CharField', [], {'max_length': '120'}),
- 'book': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'fragments'", 'to': "orm['catalogue.Book']"}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'short_text': ('django.db.models.fields.TextField', [], {}),
- 'text': ('django.db.models.fields.TextField', [], {})
- },
- 'catalogue.tag': {
- 'Meta': {'ordering': "('sort_key',)", 'unique_together': "(('slug', 'category'),)", 'object_name': 'Tag'},
- 'book_count': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}),
- 'category': ('django.db.models.fields.CharField', [], {'max_length': '50', 'db_index': 'True'}),
- 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
- 'gazeta_link': ('django.db.models.fields.CharField', [], {'max_length': '240', 'blank': 'True'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'main_page': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'db_index': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': '50', 'db_index': 'True'}),
- 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '120', 'db_index': 'True'}),
- 'sort_key': ('django.db.models.fields.CharField', [], {'max_length': '120', 'db_index': 'True'}),
- 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'blank': 'True'}),
- 'wiki_link': ('django.db.models.fields.CharField', [], {'max_length': '240', 'blank': 'True'})
- },
- 'catalogue.tagrelation': {
- 'Meta': {'unique_together': "(('tag', 'content_type', 'object_id'),)", 'object_name': 'TagRelation', 'db_table': "'catalogue_tag_relation'"},
- 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'object_id': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}),
- 'tag': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'items'", 'to': "orm['catalogue.Tag']"})
- },
- 'contenttypes.contenttype': {
- 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
- 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
- }
- }
-
- complete_apps = ['catalogue']
diff --git a/apps/catalogue/migrations/0011_auto__add_field_book_changed_at__add_field_tag_created_at__add_field_t.py b/apps/catalogue/migrations/0011_auto__add_field_book_changed_at__add_field_tag_created_at__add_field_t.py
deleted file mode 100644
index 2f573ba1b..000000000
--- a/apps/catalogue/migrations/0011_auto__add_field_book_changed_at__add_field_tag_created_at__add_field_t.py
+++ /dev/null
@@ -1,167 +0,0 @@
-# encoding: utf-8
-import datetime
-from south.db import db
-from south.v2 import SchemaMigration
-from django.db import models
-
-class Migration(SchemaMigration):
-
- def forwards(self, orm):
-
- # Adding field 'Book.changed_at'
- db.add_column('catalogue_book', 'changed_at', self.gf('django.db.models.fields.DateTimeField')(auto_now=True, default=datetime.datetime(2011, 2, 25, 15, 19, 36, 525463), db_index=True, blank=True), keep_default=False)
-
- # Adding index on 'Book', fields ['created_at']
- db.create_index('catalogue_book', ['created_at'])
-
- # Adding field 'Tag.created_at'
- db.add_column('catalogue_tag', 'created_at', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, default=datetime.datetime(2011, 2, 25, 15, 19, 42, 921525), db_index=True, blank=True), keep_default=False)
-
- # Adding field 'Tag.changed_at'
- db.add_column('catalogue_tag', 'changed_at', self.gf('django.db.models.fields.DateTimeField')(auto_now=True, default=datetime.datetime(2011, 2, 25, 15, 19, 45, 697471), db_index=True, blank=True), keep_default=False)
-
-
- def backwards(self, orm):
-
- # Removing index on 'Book', fields ['created_at']
- db.delete_index('catalogue_book', ['created_at'])
-
- # Deleting field 'Book.changed_at'
- db.delete_column('catalogue_book', 'changed_at')
-
- # Deleting field 'Tag.created_at'
- db.delete_column('catalogue_tag', 'created_at')
-
- # Deleting field 'Tag.changed_at'
- db.delete_column('catalogue_tag', 'changed_at')
-
-
- models = {
- 'auth.group': {
- 'Meta': {'object_name': 'Group'},
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': '80', 'unique': 'True'}),
- 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
- },
- 'auth.permission': {
- 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'},
- 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
- 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
- },
- 'auth.user': {
- 'Meta': {'object_name': 'User'},
- 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
- 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
- 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
- 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
- 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
- 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
- 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
- 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
- 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
- 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}),
- 'username': ('django.db.models.fields.CharField', [], {'max_length': '30', 'unique': 'True'})
- },
- 'catalogue.book': {
- 'Meta': {'ordering': "('title',)", 'object_name': 'Book'},
- '_short_html': ('django.db.models.fields.TextField', [], {}),
- '_short_html_de': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_en': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_es': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_fr': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_lt': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_pl': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_ru': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_uk': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_tag_counter': ('catalogue.fields.JSONField', [], {'null': 'True'}),
- '_theme_counter': ('catalogue.fields.JSONField', [], {'null': 'True'}),
- 'changed_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'db_index': 'True', 'blank': 'True'}),
- 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'db_index': 'True', 'blank': 'True'}),
- 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
- 'epub_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'}),
- 'extra_info': ('catalogue.fields.JSONField', [], {}),
- 'gazeta_link': ('django.db.models.fields.CharField', [], {'max_length': '240', 'blank': 'True'}),
- 'html_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'parent': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'children'", 'blank': 'True', 'null': 'True', 'to': "orm['catalogue.Book']"}),
- 'parent_number': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
- 'pdf_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'}),
- 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '120', 'unique': 'True', 'db_index': 'True'}),
- 'title': ('django.db.models.fields.CharField', [], {'max_length': '120'}),
- 'txt_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'}),
- 'wiki_link': ('django.db.models.fields.CharField', [], {'max_length': '240', 'blank': 'True'}),
- 'xml_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'})
- },
- 'catalogue.bookmedia': {
- 'Meta': {'ordering': "('type', 'name')", 'object_name': 'BookMedia'},
- 'book': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'media'", 'to': "orm['catalogue.Book']"}),
- 'extra_info': ('catalogue.fields.JSONField', [], {'default': "'{}'"}),
- 'file': ('django.db.models.fields.files.FileField', [], {'max_length': '100'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': "'100'"}),
- 'source_sha1': ('django.db.models.fields.CharField', [], {'max_length': '40', 'null': 'True', 'blank': 'True'}),
- 'type': ('django.db.models.fields.CharField', [], {'max_length': "'100'"}),
- 'uploaded_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'})
- },
- 'catalogue.filerecord': {
- 'Meta': {'ordering': "('-time', '-slug', '-type')", 'object_name': 'FileRecord'},
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'sha1': ('django.db.models.fields.CharField', [], {'max_length': '40'}),
- 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '120', 'db_index': 'True'}),
- 'time': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
- 'type': ('django.db.models.fields.CharField', [], {'max_length': '20', 'db_index': 'True'})
- },
- 'catalogue.fragment': {
- 'Meta': {'ordering': "('book', 'anchor')", 'object_name': 'Fragment'},
- '_short_html': ('django.db.models.fields.TextField', [], {}),
- '_short_html_de': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_en': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_es': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_fr': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_lt': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_pl': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_ru': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_uk': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- 'anchor': ('django.db.models.fields.CharField', [], {'max_length': '120'}),
- 'book': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'fragments'", 'to': "orm['catalogue.Book']"}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'short_text': ('django.db.models.fields.TextField', [], {}),
- 'text': ('django.db.models.fields.TextField', [], {})
- },
- 'catalogue.tag': {
- 'Meta': {'ordering': "('sort_key',)", 'unique_together': "(('slug', 'category'),)", 'object_name': 'Tag'},
- 'book_count': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}),
- 'category': ('django.db.models.fields.CharField', [], {'max_length': '50', 'db_index': 'True'}),
- 'changed_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'db_index': 'True', 'blank': 'True'}),
- 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'db_index': 'True', 'blank': 'True'}),
- 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
- 'gazeta_link': ('django.db.models.fields.CharField', [], {'max_length': '240', 'blank': 'True'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'main_page': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'db_index': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': '50', 'db_index': 'True'}),
- 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '120', 'db_index': 'True'}),
- 'sort_key': ('django.db.models.fields.CharField', [], {'max_length': '120', 'db_index': 'True'}),
- 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'blank': 'True'}),
- 'wiki_link': ('django.db.models.fields.CharField', [], {'max_length': '240', 'blank': 'True'})
- },
- 'catalogue.tagrelation': {
- 'Meta': {'unique_together': "(('tag', 'content_type', 'object_id'),)", 'object_name': 'TagRelation', 'db_table': "'catalogue_tag_relation'"},
- 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'object_id': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}),
- 'tag': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'items'", 'to': "orm['catalogue.Tag']"})
- },
- 'contenttypes.contenttype': {
- 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
- 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
- }
- }
-
- complete_apps = ['catalogue']
diff --git a/apps/catalogue/migrations/0012_auto__add_field_book_sort_key.py b/apps/catalogue/migrations/0012_auto__add_field_book_sort_key.py
deleted file mode 100644
index 466e8cc22..000000000
--- a/apps/catalogue/migrations/0012_auto__add_field_book_sort_key.py
+++ /dev/null
@@ -1,150 +0,0 @@
-# encoding: utf-8
-import datetime
-from south.db import db
-from south.v2 import SchemaMigration
-from django.db import models
-
-class Migration(SchemaMigration):
-
- def forwards(self, orm):
-
- # Adding field 'Book.sort_key'
- db.add_column('catalogue_book', 'sort_key', self.gf('django.db.models.fields.CharField')(default='', max_length=120, db_index=True), keep_default=False)
-
-
- def backwards(self, orm):
-
- # Deleting field 'Book.sort_key'
- db.delete_column('catalogue_book', 'sort_key')
-
-
- models = {
- 'auth.group': {
- 'Meta': {'object_name': 'Group'},
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),
- 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
- },
- 'auth.permission': {
- 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'},
- 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
- 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
- },
- 'auth.user': {
- 'Meta': {'object_name': 'User'},
- 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
- 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
- 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
- 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
- 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
- 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
- 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
- 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
- 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
- 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}),
- 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})
- },
- 'catalogue.book': {
- 'Meta': {'ordering': "('sort_key',)", 'object_name': 'Book'},
- '_short_html': ('django.db.models.fields.TextField', [], {}),
- '_short_html_de': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_en': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_es': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_fr': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_lt': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_pl': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_ru': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_uk': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_tag_counter': ('catalogue.fields.JSONField', [], {'null': 'True'}),
- '_theme_counter': ('catalogue.fields.JSONField', [], {'null': 'True'}),
- 'changed_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'db_index': 'True', 'blank': 'True'}),
- 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'db_index': 'True', 'blank': 'True'}),
- 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
- 'epub_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'}),
- 'extra_info': ('catalogue.fields.JSONField', [], {'default': "'{}'"}),
- 'gazeta_link': ('django.db.models.fields.CharField', [], {'max_length': '240', 'blank': 'True'}),
- 'html_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'parent': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'children'", 'null': 'True', 'to': "orm['catalogue.Book']"}),
- 'parent_number': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
- 'pdf_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'}),
- 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '120', 'db_index': 'True'}),
- 'sort_key': ('django.db.models.fields.CharField', [], {'max_length': '120', 'db_index': 'True'}),
- 'title': ('django.db.models.fields.CharField', [], {'max_length': '120'}),
- 'txt_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'}),
- 'wiki_link': ('django.db.models.fields.CharField', [], {'max_length': '240', 'blank': 'True'}),
- 'xml_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'})
- },
- 'catalogue.bookmedia': {
- 'Meta': {'ordering': "('type', 'name')", 'object_name': 'BookMedia'},
- 'book': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'media'", 'to': "orm['catalogue.Book']"}),
- 'extra_info': ('catalogue.fields.JSONField', [], {'default': "'{}'"}),
- 'file': ('django.db.models.fields.files.FileField', [], {'max_length': '100'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': "'100'"}),
- 'source_sha1': ('django.db.models.fields.CharField', [], {'max_length': '40', 'null': 'True', 'blank': 'True'}),
- 'type': ('django.db.models.fields.CharField', [], {'max_length': "'100'"}),
- 'uploaded_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'})
- },
- 'catalogue.filerecord': {
- 'Meta': {'ordering': "('-time', '-slug', '-type')", 'object_name': 'FileRecord'},
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'sha1': ('django.db.models.fields.CharField', [], {'max_length': '40'}),
- 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '120', 'db_index': 'True'}),
- 'time': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
- 'type': ('django.db.models.fields.CharField', [], {'max_length': '20', 'db_index': 'True'})
- },
- 'catalogue.fragment': {
- 'Meta': {'ordering': "('book', 'anchor')", 'object_name': 'Fragment'},
- '_short_html': ('django.db.models.fields.TextField', [], {}),
- '_short_html_de': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_en': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_es': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_fr': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_lt': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_pl': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_ru': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_uk': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- 'anchor': ('django.db.models.fields.CharField', [], {'max_length': '120'}),
- 'book': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'fragments'", 'to': "orm['catalogue.Book']"}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'short_text': ('django.db.models.fields.TextField', [], {}),
- 'text': ('django.db.models.fields.TextField', [], {})
- },
- 'catalogue.tag': {
- 'Meta': {'ordering': "('sort_key',)", 'unique_together': "(('slug', 'category'),)", 'object_name': 'Tag'},
- 'book_count': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}),
- 'category': ('django.db.models.fields.CharField', [], {'max_length': '50', 'db_index': 'True'}),
- 'changed_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'db_index': 'True', 'blank': 'True'}),
- 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'db_index': 'True', 'blank': 'True'}),
- 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
- 'gazeta_link': ('django.db.models.fields.CharField', [], {'max_length': '240', 'blank': 'True'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'main_page': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'db_index': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': '50', 'db_index': 'True'}),
- 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '120', 'db_index': 'True'}),
- 'sort_key': ('django.db.models.fields.CharField', [], {'max_length': '120', 'db_index': 'True'}),
- 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'blank': 'True'}),
- 'wiki_link': ('django.db.models.fields.CharField', [], {'max_length': '240', 'blank': 'True'})
- },
- 'catalogue.tagrelation': {
- 'Meta': {'unique_together': "(('tag', 'content_type', 'object_id'),)", 'object_name': 'TagRelation', 'db_table': "'catalogue_tag_relation'"},
- 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'object_id': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}),
- 'tag': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'items'", 'to': "orm['catalogue.Tag']"})
- },
- 'contenttypes.contenttype': {
- 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
- 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
- }
- }
-
- complete_apps = ['catalogue']
diff --git a/apps/catalogue/migrations/0013_sortify.py b/apps/catalogue/migrations/0013_sortify.py
deleted file mode 100644
index bc1218952..000000000
--- a/apps/catalogue/migrations/0013_sortify.py
+++ /dev/null
@@ -1,158 +0,0 @@
-# encoding: utf-8
-import datetime
-from south.db import db
-from south.v2 import DataMigration
-from django.db import models
-
-from sortify import sortify
-
-
-class Migration(DataMigration):
-
- def forwards(self, orm):
- "Write your forwards methods here."
-
- for b in orm.Book.objects.all():
- b.sort_key = sortify(b.title)
- b.save()
-
- for t in orm.Tag.objects.all():
- t.sort_key = sortify(t.sort_key)
- t.save()
-
-
- def backwards(self, orm):
- "Write your backwards methods here."
- pass
-
-
- models = {
- 'auth.group': {
- 'Meta': {'object_name': 'Group'},
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),
- 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
- },
- 'auth.permission': {
- 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'},
- 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
- 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
- },
- 'auth.user': {
- 'Meta': {'object_name': 'User'},
- 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
- 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
- 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
- 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
- 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
- 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
- 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
- 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
- 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
- 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}),
- 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})
- },
- 'catalogue.book': {
- 'Meta': {'ordering': "('sort_key',)", 'object_name': 'Book'},
- '_short_html': ('django.db.models.fields.TextField', [], {}),
- '_short_html_de': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_en': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_es': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_fr': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_lt': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_pl': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_ru': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_uk': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_tag_counter': ('catalogue.fields.JSONField', [], {'null': 'True'}),
- '_theme_counter': ('catalogue.fields.JSONField', [], {'null': 'True'}),
- 'changed_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'db_index': 'True', 'blank': 'True'}),
- 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'db_index': 'True', 'blank': 'True'}),
- 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
- 'epub_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'}),
- 'extra_info': ('catalogue.fields.JSONField', [], {'default': "'{}'"}),
- 'gazeta_link': ('django.db.models.fields.CharField', [], {'max_length': '240', 'blank': 'True'}),
- 'html_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'parent': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'children'", 'null': 'True', 'to': "orm['catalogue.Book']"}),
- 'parent_number': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
- 'pdf_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'}),
- 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '120', 'db_index': 'True'}),
- 'sort_key': ('django.db.models.fields.CharField', [], {'max_length': '120', 'db_index': 'True'}),
- 'title': ('django.db.models.fields.CharField', [], {'max_length': '120'}),
- 'txt_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'}),
- 'wiki_link': ('django.db.models.fields.CharField', [], {'max_length': '240', 'blank': 'True'}),
- 'xml_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'})
- },
- 'catalogue.bookmedia': {
- 'Meta': {'ordering': "('type', 'name')", 'object_name': 'BookMedia'},
- 'book': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'media'", 'to': "orm['catalogue.Book']"}),
- 'extra_info': ('catalogue.fields.JSONField', [], {'default': "'{}'"}),
- 'file': ('django.db.models.fields.files.FileField', [], {'max_length': '100'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': "'100'"}),
- 'source_sha1': ('django.db.models.fields.CharField', [], {'max_length': '40', 'null': 'True', 'blank': 'True'}),
- 'type': ('django.db.models.fields.CharField', [], {'max_length': "'100'"}),
- 'uploaded_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'})
- },
- 'catalogue.filerecord': {
- 'Meta': {'ordering': "('-time', '-slug', '-type')", 'object_name': 'FileRecord'},
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'sha1': ('django.db.models.fields.CharField', [], {'max_length': '40'}),
- 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '120', 'db_index': 'True'}),
- 'time': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
- 'type': ('django.db.models.fields.CharField', [], {'max_length': '20', 'db_index': 'True'})
- },
- 'catalogue.fragment': {
- 'Meta': {'ordering': "('book', 'anchor')", 'object_name': 'Fragment'},
- '_short_html': ('django.db.models.fields.TextField', [], {}),
- '_short_html_de': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_en': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_es': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_fr': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_lt': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_pl': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_ru': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_uk': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- 'anchor': ('django.db.models.fields.CharField', [], {'max_length': '120'}),
- 'book': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'fragments'", 'to': "orm['catalogue.Book']"}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'short_text': ('django.db.models.fields.TextField', [], {}),
- 'text': ('django.db.models.fields.TextField', [], {})
- },
- 'catalogue.tag': {
- 'Meta': {'ordering': "('sort_key',)", 'unique_together': "(('slug', 'category'),)", 'object_name': 'Tag'},
- 'book_count': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}),
- 'category': ('django.db.models.fields.CharField', [], {'max_length': '50', 'db_index': 'True'}),
- 'changed_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'db_index': 'True', 'blank': 'True'}),
- 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'db_index': 'True', 'blank': 'True'}),
- 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
- 'gazeta_link': ('django.db.models.fields.CharField', [], {'max_length': '240', 'blank': 'True'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'main_page': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'db_index': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': '50', 'db_index': 'True'}),
- 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '120', 'db_index': 'True'}),
- 'sort_key': ('django.db.models.fields.CharField', [], {'max_length': '120', 'db_index': 'True'}),
- 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'blank': 'True'}),
- 'wiki_link': ('django.db.models.fields.CharField', [], {'max_length': '240', 'blank': 'True'})
- },
- 'catalogue.tagrelation': {
- 'Meta': {'unique_together': "(('tag', 'content_type', 'object_id'),)", 'object_name': 'TagRelation', 'db_table': "'catalogue_tag_relation'"},
- 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'object_id': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}),
- 'tag': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'items'", 'to': "orm['catalogue.Tag']"})
- },
- 'contenttypes.contenttype': {
- 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
- 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
- }
- }
-
- complete_apps = ['catalogue']
diff --git a/apps/catalogue/migrations/0014_auto__chg_field_bookmedia_file.py b/apps/catalogue/migrations/0014_auto__chg_field_bookmedia_file.py
deleted file mode 100644
index 579a68191..000000000
--- a/apps/catalogue/migrations/0014_auto__chg_field_bookmedia_file.py
+++ /dev/null
@@ -1,150 +0,0 @@
-# encoding: utf-8
-import datetime
-from south.db import db
-from south.v2 import SchemaMigration
-from django.db import models
-
-class Migration(SchemaMigration):
-
- def forwards(self, orm):
-
- # Changing field 'BookMedia.file'
- db.alter_column('catalogue_bookmedia', 'file', self.gf('catalogue.fields.OverwritingFileField')(max_length=100))
-
-
- def backwards(self, orm):
-
- # Changing field 'BookMedia.file'
- db.alter_column('catalogue_bookmedia', 'file', self.gf('django.db.models.fields.files.FileField')(max_length=100))
-
-
- models = {
- 'auth.group': {
- 'Meta': {'object_name': 'Group'},
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),
- 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
- },
- 'auth.permission': {
- 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'},
- 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
- 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
- },
- 'auth.user': {
- 'Meta': {'object_name': 'User'},
- 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
- 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
- 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
- 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
- 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
- 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
- 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
- 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
- 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
- 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}),
- 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})
- },
- 'catalogue.book': {
- 'Meta': {'ordering': "('sort_key',)", 'object_name': 'Book'},
- '_short_html': ('django.db.models.fields.TextField', [], {}),
- '_short_html_de': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_en': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_es': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_fr': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_lt': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_pl': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_ru': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_uk': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_tag_counter': ('catalogue.fields.JSONField', [], {'null': 'True'}),
- '_theme_counter': ('catalogue.fields.JSONField', [], {'null': 'True'}),
- 'changed_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'db_index': 'True', 'blank': 'True'}),
- 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'db_index': 'True', 'blank': 'True'}),
- 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
- 'epub_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'}),
- 'extra_info': ('catalogue.fields.JSONField', [], {'default': "'{}'"}),
- 'gazeta_link': ('django.db.models.fields.CharField', [], {'max_length': '240', 'blank': 'True'}),
- 'html_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'parent': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'children'", 'null': 'True', 'to': "orm['catalogue.Book']"}),
- 'parent_number': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
- 'pdf_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'}),
- 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '120', 'db_index': 'True'}),
- 'sort_key': ('django.db.models.fields.CharField', [], {'max_length': '120', 'db_index': 'True'}),
- 'title': ('django.db.models.fields.CharField', [], {'max_length': '120'}),
- 'txt_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'}),
- 'wiki_link': ('django.db.models.fields.CharField', [], {'max_length': '240', 'blank': 'True'}),
- 'xml_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'})
- },
- 'catalogue.bookmedia': {
- 'Meta': {'ordering': "('type', 'name')", 'object_name': 'BookMedia'},
- 'book': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'media'", 'to': "orm['catalogue.Book']"}),
- 'extra_info': ('catalogue.fields.JSONField', [], {'default': "'{}'"}),
- 'file': ('catalogue.fields.OverwritingFileField', [], {'max_length': '100'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': "'100'"}),
- 'source_sha1': ('django.db.models.fields.CharField', [], {'max_length': '40', 'null': 'True', 'blank': 'True'}),
- 'type': ('django.db.models.fields.CharField', [], {'max_length': "'100'"}),
- 'uploaded_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'})
- },
- 'catalogue.filerecord': {
- 'Meta': {'ordering': "('-time', '-slug', '-type')", 'object_name': 'FileRecord'},
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'sha1': ('django.db.models.fields.CharField', [], {'max_length': '40'}),
- 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '120', 'db_index': 'True'}),
- 'time': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
- 'type': ('django.db.models.fields.CharField', [], {'max_length': '20', 'db_index': 'True'})
- },
- 'catalogue.fragment': {
- 'Meta': {'ordering': "('book', 'anchor')", 'object_name': 'Fragment'},
- '_short_html': ('django.db.models.fields.TextField', [], {}),
- '_short_html_de': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_en': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_es': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_fr': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_lt': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_pl': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_ru': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- '_short_html_uk': ('django.db.models.fields.TextField', [], {'null': True, 'blank': True}),
- 'anchor': ('django.db.models.fields.CharField', [], {'max_length': '120'}),
- 'book': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'fragments'", 'to': "orm['catalogue.Book']"}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'short_text': ('django.db.models.fields.TextField', [], {}),
- 'text': ('django.db.models.fields.TextField', [], {})
- },
- 'catalogue.tag': {
- 'Meta': {'ordering': "('sort_key',)", 'unique_together': "(('slug', 'category'),)", 'object_name': 'Tag'},
- 'book_count': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}),
- 'category': ('django.db.models.fields.CharField', [], {'max_length': '50', 'db_index': 'True'}),
- 'changed_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'db_index': 'True', 'blank': 'True'}),
- 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'db_index': 'True', 'blank': 'True'}),
- 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
- 'gazeta_link': ('django.db.models.fields.CharField', [], {'max_length': '240', 'blank': 'True'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'main_page': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'db_index': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': '50', 'db_index': 'True'}),
- 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '120', 'db_index': 'True'}),
- 'sort_key': ('django.db.models.fields.CharField', [], {'max_length': '120', 'db_index': 'True'}),
- 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'blank': 'True'}),
- 'wiki_link': ('django.db.models.fields.CharField', [], {'max_length': '240', 'blank': 'True'})
- },
- 'catalogue.tagrelation': {
- 'Meta': {'unique_together': "(('tag', 'content_type', 'object_id'),)", 'object_name': 'TagRelation', 'db_table': "'catalogue_tag_relation'"},
- 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'object_id': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}),
- 'tag': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'items'", 'to': "orm['catalogue.Tag']"})
- },
- 'contenttypes.contenttype': {
- 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
- 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
- }
- }
-
- complete_apps = ['catalogue']
diff --git a/apps/catalogue/migrations/0015_auto__del_field_book__short_html_en__del_field_book__short_html_es__de.py b/apps/catalogue/migrations/0015_auto__del_field_book__short_html_en__del_field_book__short_html_es__de.py
deleted file mode 100644
index 72acef980..000000000
--- a/apps/catalogue/migrations/0015_auto__del_field_book__short_html_en__del_field_book__short_html_es__de.py
+++ /dev/null
@@ -1,244 +0,0 @@
-# encoding: utf-8
-import datetime
-from south.db import db
-from south.v2 import SchemaMigration
-from django.db import models
-
-class Migration(SchemaMigration):
-
- def forwards(self, orm):
-
- # Deleting field 'Book._short_html_en'
- db.delete_column('catalogue_book', '_short_html_en')
-
- # Deleting field 'Book._short_html_es'
- db.delete_column('catalogue_book', '_short_html_es')
-
- # Deleting field 'Book._theme_counter'
- db.delete_column('catalogue_book', '_theme_counter')
-
- # Deleting field 'Book._short_html_de'
- db.delete_column('catalogue_book', '_short_html_de')
-
- # Deleting field 'Book._short_html_fr'
- db.delete_column('catalogue_book', '_short_html_fr')
-
- # Deleting field 'Book._short_html_uk'
- db.delete_column('catalogue_book', '_short_html_uk')
-
- # Deleting field 'Book._short_html_pl'
- db.delete_column('catalogue_book', '_short_html_pl')
-
- # Deleting field 'Book._short_html_lt'
- db.delete_column('catalogue_book', '_short_html_lt')
-
- # Deleting field 'Book._short_html_ru'
- db.delete_column('catalogue_book', '_short_html_ru')
-
- # Deleting field 'Book._short_html'
- db.delete_column('catalogue_book', '_short_html')
-
- # Deleting field 'Book._tag_counter'
- db.delete_column('catalogue_book', '_tag_counter')
-
- # Deleting field 'Fragment._short_html_de'
- db.delete_column('catalogue_fragment', '_short_html_de')
-
- # Deleting field 'Fragment._short_html_en'
- db.delete_column('catalogue_fragment', '_short_html_en')
-
- # Deleting field 'Fragment._short_html_fr'
- db.delete_column('catalogue_fragment', '_short_html_fr')
-
- # Deleting field 'Fragment._short_html_es'
- db.delete_column('catalogue_fragment', '_short_html_es')
-
- # Deleting field 'Fragment._short_html_uk'
- db.delete_column('catalogue_fragment', '_short_html_uk')
-
- # Deleting field 'Fragment._short_html_pl'
- db.delete_column('catalogue_fragment', '_short_html_pl')
-
- # Deleting field 'Fragment._short_html_lt'
- db.delete_column('catalogue_fragment', '_short_html_lt')
-
- # Deleting field 'Fragment._short_html_ru'
- db.delete_column('catalogue_fragment', '_short_html_ru')
-
- # Deleting field 'Fragment._short_html'
- db.delete_column('catalogue_fragment', '_short_html')
-
-
- def backwards(self, orm):
-
- # Adding field 'Book._short_html_en'
- db.add_column('catalogue_book', '_short_html_en', self.gf('django.db.models.fields.TextField')(null=True, blank=True), keep_default=False)
-
- # Adding field 'Book._short_html_es'
- db.add_column('catalogue_book', '_short_html_es', self.gf('django.db.models.fields.TextField')(null=True, blank=True), keep_default=False)
-
- # Adding field 'Book._theme_counter'
- db.add_column('catalogue_book', '_theme_counter', self.gf('catalogue.fields.JSONField')(null=True), keep_default=False)
-
- # Adding field 'Book._short_html_de'
- db.add_column('catalogue_book', '_short_html_de', self.gf('django.db.models.fields.TextField')(null=True, blank=True), keep_default=False)
-
- # Adding field 'Book._short_html_fr'
- db.add_column('catalogue_book', '_short_html_fr', self.gf('django.db.models.fields.TextField')(null=True, blank=True), keep_default=False)
-
- # Adding field 'Book._short_html_uk'
- db.add_column('catalogue_book', '_short_html_uk', self.gf('django.db.models.fields.TextField')(null=True, blank=True), keep_default=False)
-
- # Adding field 'Book._short_html_pl'
- db.add_column('catalogue_book', '_short_html_pl', self.gf('django.db.models.fields.TextField')(null=True, blank=True), keep_default=False)
-
- # Adding field 'Book._short_html_lt'
- db.add_column('catalogue_book', '_short_html_lt', self.gf('django.db.models.fields.TextField')(null=True, blank=True), keep_default=False)
-
- # Adding field 'Book._short_html_ru'
- db.add_column('catalogue_book', '_short_html_ru', self.gf('django.db.models.fields.TextField')(null=True, blank=True), keep_default=False)
-
- # Adding field 'Book._short_html'
- db.add_column('catalogue_book', '_short_html', self.gf('django.db.models.fields.TextField')(default=''), keep_default=False)
-
- # Adding field 'Book._tag_counter'
- db.add_column('catalogue_book', '_tag_counter', self.gf('catalogue.fields.JSONField')(null=True), keep_default=False)
-
- # Adding field 'Fragment._short_html_de'
- db.add_column('catalogue_fragment', '_short_html_de', self.gf('django.db.models.fields.TextField')(null=True, blank=True), keep_default=False)
-
- # Adding field 'Fragment._short_html_en'
- db.add_column('catalogue_fragment', '_short_html_en', self.gf('django.db.models.fields.TextField')(null=True, blank=True), keep_default=False)
-
- # Adding field 'Fragment._short_html_fr'
- db.add_column('catalogue_fragment', '_short_html_fr', self.gf('django.db.models.fields.TextField')(null=True, blank=True), keep_default=False)
-
- # Adding field 'Fragment._short_html_es'
- db.add_column('catalogue_fragment', '_short_html_es', self.gf('django.db.models.fields.TextField')(null=True, blank=True), keep_default=False)
-
- # Adding field 'Fragment._short_html_uk'
- db.add_column('catalogue_fragment', '_short_html_uk', self.gf('django.db.models.fields.TextField')(null=True, blank=True), keep_default=False)
-
- # Adding field 'Fragment._short_html_pl'
- db.add_column('catalogue_fragment', '_short_html_pl', self.gf('django.db.models.fields.TextField')(null=True, blank=True), keep_default=False)
-
- # Adding field 'Fragment._short_html_lt'
- db.add_column('catalogue_fragment', '_short_html_lt', self.gf('django.db.models.fields.TextField')(null=True, blank=True), keep_default=False)
-
- # Adding field 'Fragment._short_html_ru'
- db.add_column('catalogue_fragment', '_short_html_ru', self.gf('django.db.models.fields.TextField')(null=True, blank=True), keep_default=False)
-
- # Adding field 'Fragment._short_html'
- db.add_column('catalogue_fragment', '_short_html', self.gf('django.db.models.fields.TextField')(default=''), keep_default=False)
-
-
- models = {
- 'auth.group': {
- 'Meta': {'object_name': 'Group'},
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),
- 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
- },
- 'auth.permission': {
- 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'},
- 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
- 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
- },
- 'auth.user': {
- 'Meta': {'object_name': 'User'},
- 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
- 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
- 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
- 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
- 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
- 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
- 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
- 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
- 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
- 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}),
- 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})
- },
- 'catalogue.book': {
- 'Meta': {'ordering': "('sort_key',)", 'object_name': 'Book'},
- 'changed_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'db_index': 'True', 'blank': 'True'}),
- 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'db_index': 'True', 'blank': 'True'}),
- 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
- 'epub_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'}),
- 'extra_info': ('catalogue.fields.JSONField', [], {'default': "'{}'"}),
- 'gazeta_link': ('django.db.models.fields.CharField', [], {'max_length': '240', 'blank': 'True'}),
- 'html_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'parent': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'children'", 'null': 'True', 'to': "orm['catalogue.Book']"}),
- 'parent_number': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
- 'pdf_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'}),
- 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '120', 'db_index': 'True'}),
- 'sort_key': ('django.db.models.fields.CharField', [], {'max_length': '120', 'db_index': 'True'}),
- 'title': ('django.db.models.fields.CharField', [], {'max_length': '120'}),
- 'txt_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'}),
- 'wiki_link': ('django.db.models.fields.CharField', [], {'max_length': '240', 'blank': 'True'}),
- 'xml_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'})
- },
- 'catalogue.bookmedia': {
- 'Meta': {'ordering': "('type', 'name')", 'object_name': 'BookMedia'},
- 'book': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'media'", 'to': "orm['catalogue.Book']"}),
- 'extra_info': ('catalogue.fields.JSONField', [], {'default': "'{}'"}),
- 'file': ('catalogue.fields.OverwritingFileField', [], {'max_length': '100'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': "'100'"}),
- 'source_sha1': ('django.db.models.fields.CharField', [], {'max_length': '40', 'null': 'True', 'blank': 'True'}),
- 'type': ('django.db.models.fields.CharField', [], {'max_length': "'100'"}),
- 'uploaded_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'})
- },
- 'catalogue.filerecord': {
- 'Meta': {'ordering': "('-time', '-slug', '-type')", 'object_name': 'FileRecord'},
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'sha1': ('django.db.models.fields.CharField', [], {'max_length': '40'}),
- 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '120', 'db_index': 'True'}),
- 'time': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
- 'type': ('django.db.models.fields.CharField', [], {'max_length': '20', 'db_index': 'True'})
- },
- 'catalogue.fragment': {
- 'Meta': {'ordering': "('book', 'anchor')", 'object_name': 'Fragment'},
- 'anchor': ('django.db.models.fields.CharField', [], {'max_length': '120'}),
- 'book': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'fragments'", 'to': "orm['catalogue.Book']"}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'short_text': ('django.db.models.fields.TextField', [], {}),
- 'text': ('django.db.models.fields.TextField', [], {})
- },
- 'catalogue.tag': {
- 'Meta': {'ordering': "('sort_key',)", 'unique_together': "(('slug', 'category'),)", 'object_name': 'Tag'},
- 'book_count': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}),
- 'category': ('django.db.models.fields.CharField', [], {'max_length': '50', 'db_index': 'True'}),
- 'changed_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'db_index': 'True', 'blank': 'True'}),
- 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'db_index': 'True', 'blank': 'True'}),
- 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
- 'gazeta_link': ('django.db.models.fields.CharField', [], {'max_length': '240', 'blank': 'True'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'main_page': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'db_index': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': '50', 'db_index': 'True'}),
- 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '120', 'db_index': 'True'}),
- 'sort_key': ('django.db.models.fields.CharField', [], {'max_length': '120', 'db_index': 'True'}),
- 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'blank': 'True'}),
- 'wiki_link': ('django.db.models.fields.CharField', [], {'max_length': '240', 'blank': 'True'})
- },
- 'catalogue.tagrelation': {
- 'Meta': {'unique_together': "(('tag', 'content_type', 'object_id'),)", 'object_name': 'TagRelation', 'db_table': "'catalogue_tag_relation'"},
- 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'object_id': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}),
- 'tag': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'items'", 'to': "orm['catalogue.Tag']"})
- },
- 'contenttypes.contenttype': {
- 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
- 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
- }
- }
-
- complete_apps = ['catalogue']
diff --git a/apps/catalogue/migrations/0016_auto__add_field_book_mobi_file.py b/apps/catalogue/migrations/0016_auto__add_field_book_mobi_file.py
deleted file mode 100644
index 87faf6bc2..000000000
--- a/apps/catalogue/migrations/0016_auto__add_field_book_mobi_file.py
+++ /dev/null
@@ -1,131 +0,0 @@
-# encoding: utf-8
-import datetime
-from south.db import db
-from south.v2 import SchemaMigration
-from django.db import models
-
-class Migration(SchemaMigration):
-
- def forwards(self, orm):
-
- # Adding field 'Book.mobi_file'
- db.add_column('catalogue_book', 'mobi_file', self.gf('django.db.models.fields.files.FileField')(default='', max_length=100, blank=True), keep_default=False)
-
-
- def backwards(self, orm):
-
- # Deleting field 'Book.mobi_file'
- db.delete_column('catalogue_book', 'mobi_file')
-
-
- models = {
- 'auth.group': {
- 'Meta': {'object_name': 'Group'},
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),
- 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
- },
- 'auth.permission': {
- 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'},
- 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
- 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
- },
- 'auth.user': {
- 'Meta': {'object_name': 'User'},
- 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
- 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
- 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
- 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
- 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
- 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
- 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
- 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
- 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
- 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}),
- 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})
- },
- 'catalogue.book': {
- 'Meta': {'ordering': "('sort_key',)", 'object_name': 'Book'},
- 'changed_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'db_index': 'True', 'blank': 'True'}),
- 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'db_index': 'True', 'blank': 'True'}),
- 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
- 'epub_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'}),
- 'extra_info': ('catalogue.fields.JSONField', [], {'default': "'{}'"}),
- 'gazeta_link': ('django.db.models.fields.CharField', [], {'max_length': '240', 'blank': 'True'}),
- 'html_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'mobi_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'}),
- 'parent': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'children'", 'null': 'True', 'to': "orm['catalogue.Book']"}),
- 'parent_number': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
- 'pdf_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'}),
- 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '120', 'db_index': 'True'}),
- 'sort_key': ('django.db.models.fields.CharField', [], {'max_length': '120', 'db_index': 'True'}),
- 'title': ('django.db.models.fields.CharField', [], {'max_length': '120'}),
- 'txt_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'}),
- 'wiki_link': ('django.db.models.fields.CharField', [], {'max_length': '240', 'blank': 'True'}),
- 'xml_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'})
- },
- 'catalogue.bookmedia': {
- 'Meta': {'ordering': "('type', 'name')", 'object_name': 'BookMedia'},
- 'book': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'media'", 'to': "orm['catalogue.Book']"}),
- 'extra_info': ('catalogue.fields.JSONField', [], {'default': "'{}'"}),
- 'file': ('catalogue.fields.OverwritingFileField', [], {'max_length': '100'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': "'100'"}),
- 'source_sha1': ('django.db.models.fields.CharField', [], {'max_length': '40', 'null': 'True', 'blank': 'True'}),
- 'type': ('django.db.models.fields.CharField', [], {'max_length': "'100'"}),
- 'uploaded_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'})
- },
- 'catalogue.filerecord': {
- 'Meta': {'ordering': "('-time', '-slug', '-type')", 'object_name': 'FileRecord'},
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'sha1': ('django.db.models.fields.CharField', [], {'max_length': '40'}),
- 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '120', 'db_index': 'True'}),
- 'time': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
- 'type': ('django.db.models.fields.CharField', [], {'max_length': '20', 'db_index': 'True'})
- },
- 'catalogue.fragment': {
- 'Meta': {'ordering': "('book', 'anchor')", 'object_name': 'Fragment'},
- 'anchor': ('django.db.models.fields.CharField', [], {'max_length': '120'}),
- 'book': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'fragments'", 'to': "orm['catalogue.Book']"}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'short_text': ('django.db.models.fields.TextField', [], {}),
- 'text': ('django.db.models.fields.TextField', [], {})
- },
- 'catalogue.tag': {
- 'Meta': {'ordering': "('sort_key',)", 'unique_together': "(('slug', 'category'),)", 'object_name': 'Tag'},
- 'book_count': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}),
- 'category': ('django.db.models.fields.CharField', [], {'max_length': '50', 'db_index': 'True'}),
- 'changed_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'db_index': 'True', 'blank': 'True'}),
- 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'db_index': 'True', 'blank': 'True'}),
- 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
- 'gazeta_link': ('django.db.models.fields.CharField', [], {'max_length': '240', 'blank': 'True'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'main_page': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'db_index': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': '50', 'db_index': 'True'}),
- 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '120', 'db_index': 'True'}),
- 'sort_key': ('django.db.models.fields.CharField', [], {'max_length': '120', 'db_index': 'True'}),
- 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'blank': 'True'}),
- 'wiki_link': ('django.db.models.fields.CharField', [], {'max_length': '240', 'blank': 'True'})
- },
- 'catalogue.tagrelation': {
- 'Meta': {'unique_together': "(('tag', 'content_type', 'object_id'),)", 'object_name': 'TagRelation', 'db_table': "'catalogue_tag_relation'"},
- 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'object_id': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}),
- 'tag': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'items'", 'to': "orm['catalogue.Tag']"})
- },
- 'contenttypes.contenttype': {
- 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
- 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
- }
- }
-
- complete_apps = ['catalogue']
diff --git a/apps/catalogue/migrations/0017_auto__add_field_book_language__del_unique_book_slug__add_unique_book_s.py b/apps/catalogue/migrations/0017_auto__add_field_book_language__del_unique_book_slug__add_unique_book_s.py
deleted file mode 100644
index 6d1edcfa1..000000000
--- a/apps/catalogue/migrations/0017_auto__add_field_book_language__del_unique_book_slug__add_unique_book_s.py
+++ /dev/null
@@ -1,144 +0,0 @@
-# encoding: utf-8
-import datetime
-from south.db import db
-from south.v2 import SchemaMigration
-from django.db import models
-
-class Migration(SchemaMigration):
-
- def forwards(self, orm):
-
- # Removing unique constraint on 'Book', fields ['slug']
- db.delete_unique('catalogue_book', ['slug'])
-
- # Adding field 'Book.language'
- db.add_column('catalogue_book', 'language', self.gf('django.db.models.fields.CharField')(default='pol', max_length=3, db_index=True), keep_default=False)
-
- # Adding unique constraint on 'Book', fields ['slug', 'language']
- db.create_unique('catalogue_book', ['slug', 'language'])
-
-
- def backwards(self, orm):
-
- # Removing unique constraint on 'Book', fields ['slug', 'language']
- db.delete_unique('catalogue_book', ['slug', 'language'])
-
- # Deleting field 'Book.language'
- db.delete_column('catalogue_book', 'language')
-
- # Adding unique constraint on 'Book', fields ['slug']
- db.create_unique('catalogue_book', ['slug'])
-
-
- models = {
- 'auth.group': {
- 'Meta': {'object_name': 'Group'},
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),
- 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
- },
- 'auth.permission': {
- 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'},
- 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
- 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
- },
- 'auth.user': {
- 'Meta': {'object_name': 'User'},
- 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
- 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
- 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
- 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
- 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
- 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
- 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
- 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
- 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
- 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}),
- 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})
- },
- 'catalogue.book': {
- 'Meta': {'ordering': "('sort_key',)", 'unique_together': "[['slug', 'language']]", 'object_name': 'Book'},
- 'changed_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'db_index': 'True', 'blank': 'True'}),
- 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'db_index': 'True', 'blank': 'True'}),
- 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
- 'epub_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'}),
- 'extra_info': ('catalogue.fields.JSONField', [], {'default': "'{}'"}),
- 'gazeta_link': ('django.db.models.fields.CharField', [], {'max_length': '240', 'blank': 'True'}),
- 'html_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'language': ('django.db.models.fields.CharField', [], {'default': "'pol'", 'max_length': '3', 'db_index': 'True'}),
- 'mobi_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'}),
- 'parent': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'children'", 'null': 'True', 'to': "orm['catalogue.Book']"}),
- 'parent_number': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
- 'pdf_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'}),
- 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '120', 'db_index': 'True'}),
- 'sort_key': ('django.db.models.fields.CharField', [], {'max_length': '120', 'db_index': 'True'}),
- 'title': ('django.db.models.fields.CharField', [], {'max_length': '120'}),
- 'txt_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'}),
- 'wiki_link': ('django.db.models.fields.CharField', [], {'max_length': '240', 'blank': 'True'}),
- 'xml_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'})
- },
- 'catalogue.bookmedia': {
- 'Meta': {'ordering': "('type', 'name')", 'object_name': 'BookMedia'},
- 'book': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'media'", 'to': "orm['catalogue.Book']"}),
- 'extra_info': ('catalogue.fields.JSONField', [], {'default': "'{}'"}),
- 'file': ('catalogue.fields.OverwritingFileField', [], {'max_length': '100'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': "'100'"}),
- 'source_sha1': ('django.db.models.fields.CharField', [], {'max_length': '40', 'null': 'True', 'blank': 'True'}),
- 'type': ('django.db.models.fields.CharField', [], {'max_length': "'100'"}),
- 'uploaded_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'})
- },
- 'catalogue.filerecord': {
- 'Meta': {'ordering': "('-time', '-slug', '-type')", 'object_name': 'FileRecord'},
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'sha1': ('django.db.models.fields.CharField', [], {'max_length': '40'}),
- 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '120', 'db_index': 'True'}),
- 'time': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
- 'type': ('django.db.models.fields.CharField', [], {'max_length': '20', 'db_index': 'True'})
- },
- 'catalogue.fragment': {
- 'Meta': {'ordering': "('book', 'anchor')", 'object_name': 'Fragment'},
- 'anchor': ('django.db.models.fields.CharField', [], {'max_length': '120'}),
- 'book': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'fragments'", 'to': "orm['catalogue.Book']"}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'short_text': ('django.db.models.fields.TextField', [], {}),
- 'text': ('django.db.models.fields.TextField', [], {})
- },
- 'catalogue.tag': {
- 'Meta': {'ordering': "('sort_key',)", 'unique_together': "(('slug', 'category'),)", 'object_name': 'Tag'},
- 'book_count': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}),
- 'category': ('django.db.models.fields.CharField', [], {'max_length': '50', 'db_index': 'True'}),
- 'changed_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'db_index': 'True', 'blank': 'True'}),
- 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'db_index': 'True', 'blank': 'True'}),
- 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
- 'gazeta_link': ('django.db.models.fields.CharField', [], {'max_length': '240', 'blank': 'True'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'main_page': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'db_index': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': '50', 'db_index': 'True'}),
- 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '120', 'db_index': 'True'}),
- 'sort_key': ('django.db.models.fields.CharField', [], {'max_length': '120', 'db_index': 'True'}),
- 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'blank': 'True'}),
- 'wiki_link': ('django.db.models.fields.CharField', [], {'max_length': '240', 'blank': 'True'})
- },
- 'catalogue.tagrelation': {
- 'Meta': {'unique_together': "(('tag', 'content_type', 'object_id'),)", 'object_name': 'TagRelation', 'db_table': "'catalogue_tag_relation'"},
- 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'object_id': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}),
- 'tag': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'items'", 'to': "orm['catalogue.Tag']"})
- },
- 'contenttypes.contenttype': {
- 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
- 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
- }
- }
-
- complete_apps = ['catalogue']
diff --git a/apps/catalogue/migrations/0018_auto__del_filerecord.py b/apps/catalogue/migrations/0018_auto__del_filerecord.py
deleted file mode 100644
index 66a6542a3..000000000
--- a/apps/catalogue/migrations/0018_auto__del_filerecord.py
+++ /dev/null
@@ -1,131 +0,0 @@
-# encoding: utf-8
-import datetime
-from south.db import db
-from south.v2 import SchemaMigration
-from django.db import models
-
-class Migration(SchemaMigration):
-
- def forwards(self, orm):
-
- # Deleting model 'FileRecord'
- db.delete_table('catalogue_filerecord')
-
-
- def backwards(self, orm):
-
- # Adding model 'FileRecord'
- db.create_table('catalogue_filerecord', (
- ('sha1', self.gf('django.db.models.fields.CharField')(max_length=40)),
- ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
- ('time', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, blank=True)),
- ('type', self.gf('django.db.models.fields.CharField')(max_length=20, db_index=True)),
- ('slug', self.gf('django.db.models.fields.SlugField')(max_length=120, db_index=True)),
- ))
- db.send_create_signal('catalogue', ['FileRecord'])
-
-
- models = {
- 'auth.group': {
- 'Meta': {'object_name': 'Group'},
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),
- 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
- },
- 'auth.permission': {
- 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'},
- 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
- 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
- },
- 'auth.user': {
- 'Meta': {'object_name': 'User'},
- 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
- 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
- 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
- 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
- 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
- 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
- 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
- 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
- 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
- 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}),
- 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})
- },
- 'catalogue.book': {
- 'Meta': {'ordering': "('sort_key',)", 'unique_together': "[['slug', 'language']]", 'object_name': 'Book'},
- 'changed_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'db_index': 'True', 'blank': 'True'}),
- 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'db_index': 'True', 'blank': 'True'}),
- 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
- 'epub_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'}),
- 'extra_info': ('catalogue.fields.JSONField', [], {'default': "'{}'"}),
- 'gazeta_link': ('django.db.models.fields.CharField', [], {'max_length': '240', 'blank': 'True'}),
- 'html_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'language': ('django.db.models.fields.CharField', [], {'default': "'pol'", 'max_length': '3', 'db_index': 'True'}),
- 'mobi_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'}),
- 'parent': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'children'", 'null': 'True', 'to': "orm['catalogue.Book']"}),
- 'parent_number': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
- 'pdf_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'}),
- 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '120', 'db_index': 'True'}),
- 'sort_key': ('django.db.models.fields.CharField', [], {'max_length': '120', 'db_index': 'True'}),
- 'title': ('django.db.models.fields.CharField', [], {'max_length': '120'}),
- 'txt_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'}),
- 'wiki_link': ('django.db.models.fields.CharField', [], {'max_length': '240', 'blank': 'True'}),
- 'xml_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'})
- },
- 'catalogue.bookmedia': {
- 'Meta': {'ordering': "('type', 'name')", 'object_name': 'BookMedia'},
- 'book': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'media'", 'to': "orm['catalogue.Book']"}),
- 'extra_info': ('catalogue.fields.JSONField', [], {'default': "'{}'"}),
- 'file': ('catalogue.fields.OverwritingFileField', [], {'max_length': '100'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': "'100'"}),
- 'source_sha1': ('django.db.models.fields.CharField', [], {'max_length': '40', 'null': 'True', 'blank': 'True'}),
- 'type': ('django.db.models.fields.CharField', [], {'max_length': "'100'"}),
- 'uploaded_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'})
- },
- 'catalogue.fragment': {
- 'Meta': {'ordering': "('book', 'anchor')", 'object_name': 'Fragment'},
- 'anchor': ('django.db.models.fields.CharField', [], {'max_length': '120'}),
- 'book': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'fragments'", 'to': "orm['catalogue.Book']"}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'short_text': ('django.db.models.fields.TextField', [], {}),
- 'text': ('django.db.models.fields.TextField', [], {})
- },
- 'catalogue.tag': {
- 'Meta': {'ordering': "('sort_key',)", 'unique_together': "(('slug', 'category'),)", 'object_name': 'Tag'},
- 'book_count': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}),
- 'category': ('django.db.models.fields.CharField', [], {'max_length': '50', 'db_index': 'True'}),
- 'changed_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'db_index': 'True', 'blank': 'True'}),
- 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'db_index': 'True', 'blank': 'True'}),
- 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
- 'gazeta_link': ('django.db.models.fields.CharField', [], {'max_length': '240', 'blank': 'True'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'main_page': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'db_index': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': '50', 'db_index': 'True'}),
- 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '120', 'db_index': 'True'}),
- 'sort_key': ('django.db.models.fields.CharField', [], {'max_length': '120', 'db_index': 'True'}),
- 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'blank': 'True'}),
- 'wiki_link': ('django.db.models.fields.CharField', [], {'max_length': '240', 'blank': 'True'})
- },
- 'catalogue.tagrelation': {
- 'Meta': {'unique_together': "(('tag', 'content_type', 'object_id'),)", 'object_name': 'TagRelation', 'db_table': "'catalogue_tag_relation'"},
- 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'object_id': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}),
- 'tag': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'items'", 'to': "orm['catalogue.Tag']"})
- },
- 'contenttypes.contenttype': {
- 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
- 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
- }
- }
-
- complete_apps = ['catalogue']
diff --git a/apps/catalogue/migrations/0019_auto__add_field_book_cover.py b/apps/catalogue/migrations/0019_auto__add_field_book_cover.py
deleted file mode 100644
index 259d935ba..000000000
--- a/apps/catalogue/migrations/0019_auto__add_field_book_cover.py
+++ /dev/null
@@ -1,125 +0,0 @@
-# encoding: utf-8
-import datetime
-from south.db import db
-from south.v2 import SchemaMigration
-from django.db import models
-
-class Migration(SchemaMigration):
-
- def forwards(self, orm):
-
- # Adding field 'Book.cover'
- db.add_column('catalogue_book', 'cover', self.gf('django.db.models.fields.files.FileField')(max_length=100, null=True, blank=True), keep_default=False)
-
-
- def backwards(self, orm):
-
- # Deleting field 'Book.cover'
- db.delete_column('catalogue_book', 'cover')
-
-
- models = {
- 'auth.group': {
- 'Meta': {'object_name': 'Group'},
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),
- 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
- },
- 'auth.permission': {
- 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'},
- 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
- 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
- },
- 'auth.user': {
- 'Meta': {'object_name': 'User'},
- 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
- 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
- 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
- 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
- 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
- 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
- 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
- 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
- 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
- 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}),
- 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})
- },
- 'catalogue.book': {
- 'Meta': {'ordering': "('sort_key',)", 'unique_together': "[['slug', 'language']]", 'object_name': 'Book'},
- 'changed_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'db_index': 'True', 'blank': 'True'}),
- 'cover': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
- 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'db_index': 'True', 'blank': 'True'}),
- 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
- 'epub_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'}),
- 'extra_info': ('catalogue.fields.JSONField', [], {'default': "'{}'"}),
- 'gazeta_link': ('django.db.models.fields.CharField', [], {'max_length': '240', 'blank': 'True'}),
- 'html_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'language': ('django.db.models.fields.CharField', [], {'default': "'pol'", 'max_length': '3', 'db_index': 'True'}),
- 'mobi_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'}),
- 'parent': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'children'", 'null': 'True', 'to': "orm['catalogue.Book']"}),
- 'parent_number': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
- 'pdf_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'}),
- 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '120', 'db_index': 'True'}),
- 'sort_key': ('django.db.models.fields.CharField', [], {'max_length': '120', 'db_index': 'True'}),
- 'title': ('django.db.models.fields.CharField', [], {'max_length': '120'}),
- 'txt_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'}),
- 'wiki_link': ('django.db.models.fields.CharField', [], {'max_length': '240', 'blank': 'True'}),
- 'xml_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'})
- },
- 'catalogue.bookmedia': {
- 'Meta': {'ordering': "('type', 'name')", 'object_name': 'BookMedia'},
- 'book': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'media'", 'to': "orm['catalogue.Book']"}),
- 'extra_info': ('catalogue.fields.JSONField', [], {'default': "'{}'"}),
- 'file': ('catalogue.fields.OverwritingFileField', [], {'max_length': '100'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': "'100'"}),
- 'source_sha1': ('django.db.models.fields.CharField', [], {'max_length': '40', 'null': 'True', 'blank': 'True'}),
- 'type': ('django.db.models.fields.CharField', [], {'max_length': "'100'"}),
- 'uploaded_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'})
- },
- 'catalogue.fragment': {
- 'Meta': {'ordering': "('book', 'anchor')", 'object_name': 'Fragment'},
- 'anchor': ('django.db.models.fields.CharField', [], {'max_length': '120'}),
- 'book': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'fragments'", 'to': "orm['catalogue.Book']"}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'short_text': ('django.db.models.fields.TextField', [], {}),
- 'text': ('django.db.models.fields.TextField', [], {})
- },
- 'catalogue.tag': {
- 'Meta': {'ordering': "('sort_key',)", 'unique_together': "(('slug', 'category'),)", 'object_name': 'Tag'},
- 'book_count': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}),
- 'category': ('django.db.models.fields.CharField', [], {'max_length': '50', 'db_index': 'True'}),
- 'changed_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'db_index': 'True', 'blank': 'True'}),
- 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'db_index': 'True', 'blank': 'True'}),
- 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
- 'gazeta_link': ('django.db.models.fields.CharField', [], {'max_length': '240', 'blank': 'True'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'main_page': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'db_index': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': '50', 'db_index': 'True'}),
- 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '120', 'db_index': 'True'}),
- 'sort_key': ('django.db.models.fields.CharField', [], {'max_length': '120', 'db_index': 'True'}),
- 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'blank': 'True'}),
- 'wiki_link': ('django.db.models.fields.CharField', [], {'max_length': '240', 'blank': 'True'})
- },
- 'catalogue.tagrelation': {
- 'Meta': {'unique_together': "(('tag', 'content_type', 'object_id'),)", 'object_name': 'TagRelation', 'db_table': "'catalogue_tag_relation'"},
- 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'object_id': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}),
- 'tag': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'items'", 'to': "orm['catalogue.Tag']"})
- },
- 'contenttypes.contenttype': {
- 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
- 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
- }
- }
-
- complete_apps = ['catalogue']
diff --git a/apps/catalogue/migrations/0020_auto__del_field_tag_main_page.py b/apps/catalogue/migrations/0020_auto__del_field_tag_main_page.py
deleted file mode 100644
index e9f77946e..000000000
--- a/apps/catalogue/migrations/0020_auto__del_field_tag_main_page.py
+++ /dev/null
@@ -1,124 +0,0 @@
-# encoding: utf-8
-import datetime
-from south.db import db
-from south.v2 import SchemaMigration
-from django.db import models
-
-class Migration(SchemaMigration):
-
- def forwards(self, orm):
-
- # Deleting field 'Tag.main_page'
- db.delete_column('catalogue_tag', 'main_page')
-
-
- def backwards(self, orm):
-
- # Adding field 'Tag.main_page'
- db.add_column('catalogue_tag', 'main_page', self.gf('django.db.models.fields.BooleanField')(default=False, db_index=True), keep_default=False)
-
-
- models = {
- 'auth.group': {
- 'Meta': {'object_name': 'Group'},
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),
- 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
- },
- 'auth.permission': {
- 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'},
- 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
- 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
- },
- 'auth.user': {
- 'Meta': {'object_name': 'User'},
- 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
- 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
- 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
- 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
- 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
- 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
- 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
- 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
- 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
- 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}),
- 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})
- },
- 'catalogue.book': {
- 'Meta': {'ordering': "('sort_key',)", 'unique_together': "[['slug', 'language']]", 'object_name': 'Book'},
- 'changed_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'db_index': 'True', 'blank': 'True'}),
- 'cover': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
- 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'db_index': 'True', 'blank': 'True'}),
- 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
- 'epub_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'}),
- 'extra_info': ('catalogue.fields.JSONField', [], {'default': "'{}'"}),
- 'gazeta_link': ('django.db.models.fields.CharField', [], {'max_length': '240', 'blank': 'True'}),
- 'html_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'language': ('django.db.models.fields.CharField', [], {'default': "'pol'", 'max_length': '3', 'db_index': 'True'}),
- 'mobi_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'}),
- 'parent': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'children'", 'null': 'True', 'to': "orm['catalogue.Book']"}),
- 'parent_number': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
- 'pdf_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'}),
- 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '120', 'db_index': 'True'}),
- 'sort_key': ('django.db.models.fields.CharField', [], {'max_length': '120', 'db_index': 'True'}),
- 'title': ('django.db.models.fields.CharField', [], {'max_length': '120'}),
- 'txt_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'}),
- 'wiki_link': ('django.db.models.fields.CharField', [], {'max_length': '240', 'blank': 'True'}),
- 'xml_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'})
- },
- 'catalogue.bookmedia': {
- 'Meta': {'ordering': "('type', 'name')", 'object_name': 'BookMedia'},
- 'book': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'media'", 'to': "orm['catalogue.Book']"}),
- 'extra_info': ('catalogue.fields.JSONField', [], {'default': "'{}'"}),
- 'file': ('catalogue.fields.OverwritingFileField', [], {'max_length': '100'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': "'100'"}),
- 'source_sha1': ('django.db.models.fields.CharField', [], {'max_length': '40', 'null': 'True', 'blank': 'True'}),
- 'type': ('django.db.models.fields.CharField', [], {'max_length': "'100'"}),
- 'uploaded_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'})
- },
- 'catalogue.fragment': {
- 'Meta': {'ordering': "('book', 'anchor')", 'object_name': 'Fragment'},
- 'anchor': ('django.db.models.fields.CharField', [], {'max_length': '120'}),
- 'book': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'fragments'", 'to': "orm['catalogue.Book']"}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'short_text': ('django.db.models.fields.TextField', [], {}),
- 'text': ('django.db.models.fields.TextField', [], {})
- },
- 'catalogue.tag': {
- 'Meta': {'ordering': "('sort_key',)", 'unique_together': "(('slug', 'category'),)", 'object_name': 'Tag'},
- 'book_count': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}),
- 'category': ('django.db.models.fields.CharField', [], {'max_length': '50', 'db_index': 'True'}),
- 'changed_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'db_index': 'True', 'blank': 'True'}),
- 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'db_index': 'True', 'blank': 'True'}),
- 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
- 'gazeta_link': ('django.db.models.fields.CharField', [], {'max_length': '240', 'blank': 'True'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': '50', 'db_index': 'True'}),
- 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '120', 'db_index': 'True'}),
- 'sort_key': ('django.db.models.fields.CharField', [], {'max_length': '120', 'db_index': 'True'}),
- 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'blank': 'True'}),
- 'wiki_link': ('django.db.models.fields.CharField', [], {'max_length': '240', 'blank': 'True'})
- },
- 'catalogue.tagrelation': {
- 'Meta': {'unique_together': "(('tag', 'content_type', 'object_id'),)", 'object_name': 'TagRelation', 'db_table': "'catalogue_tag_relation'"},
- 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'object_id': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}),
- 'tag': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'items'", 'to': "orm['catalogue.Tag']"})
- },
- 'contenttypes.contenttype': {
- 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
- 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
- }
- }
-
- complete_apps = ['catalogue']
diff --git a/apps/catalogue/migrations/0021_build_covers.py b/apps/catalogue/migrations/0021_build_covers.py
deleted file mode 100644
index 319decb18..000000000
--- a/apps/catalogue/migrations/0021_build_covers.py
+++ /dev/null
@@ -1,137 +0,0 @@
-# encoding: utf-8
-import datetime
-from south.db import db
-from south.v2 import DataMigration
-from django.db import models
-
-class Migration(DataMigration):
-
- def forwards(self, orm):
- "Write your forwards methods here."
- from StringIO import StringIO
- from django.core.files.base import ContentFile
- from librarian import ValidationError
- from librarian.cover import WLCover
- from librarian.dcparser import BookInfo
-
- for book in orm.Book.objects.filter(cover=None):
- try:
- book_info = BookInfo.from_file(book.xml_file.path)
- except ValidationError:
- pass
- else:
- cover = WLCover(book_info).image()
- imgstr = StringIO()
- cover.save(imgstr, 'png')
- book.cover.save('book/png/%s.png' % book.slug,
- ContentFile(imgstr.getvalue()))
-
-
- def backwards(self, orm):
- "Write your backwards methods here."
-
-
- models = {
- 'auth.group': {
- 'Meta': {'object_name': 'Group'},
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),
- 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
- },
- 'auth.permission': {
- 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'},
- 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
- 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
- },
- 'auth.user': {
- 'Meta': {'object_name': 'User'},
- 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
- 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
- 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
- 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
- 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
- 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
- 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
- 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
- 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
- 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}),
- 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})
- },
- 'catalogue.book': {
- 'Meta': {'ordering': "('sort_key',)", 'unique_together': "[['slug', 'language']]", 'object_name': 'Book'},
- 'changed_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'db_index': 'True', 'blank': 'True'}),
- 'cover': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
- 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'db_index': 'True', 'blank': 'True'}),
- 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
- 'epub_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'}),
- 'extra_info': ('catalogue.fields.JSONField', [], {'default': "'{}'"}),
- 'gazeta_link': ('django.db.models.fields.CharField', [], {'max_length': '240', 'blank': 'True'}),
- 'html_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'language': ('django.db.models.fields.CharField', [], {'default': "'pol'", 'max_length': '3', 'db_index': 'True'}),
- 'mobi_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'}),
- 'parent': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'children'", 'null': 'True', 'to': "orm['catalogue.Book']"}),
- 'parent_number': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
- 'pdf_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'}),
- 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '120', 'db_index': 'True'}),
- 'sort_key': ('django.db.models.fields.CharField', [], {'max_length': '120', 'db_index': 'True'}),
- 'title': ('django.db.models.fields.CharField', [], {'max_length': '120'}),
- 'txt_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'}),
- 'wiki_link': ('django.db.models.fields.CharField', [], {'max_length': '240', 'blank': 'True'}),
- 'xml_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'})
- },
- 'catalogue.bookmedia': {
- 'Meta': {'ordering': "('type', 'name')", 'object_name': 'BookMedia'},
- 'book': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'media'", 'to': "orm['catalogue.Book']"}),
- 'extra_info': ('catalogue.fields.JSONField', [], {'default': "'{}'"}),
- 'file': ('catalogue.fields.OverwritingFileField', [], {'max_length': '100'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': "'100'"}),
- 'source_sha1': ('django.db.models.fields.CharField', [], {'max_length': '40', 'null': 'True', 'blank': 'True'}),
- 'type': ('django.db.models.fields.CharField', [], {'max_length': "'100'"}),
- 'uploaded_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'})
- },
- 'catalogue.fragment': {
- 'Meta': {'ordering': "('book', 'anchor')", 'object_name': 'Fragment'},
- 'anchor': ('django.db.models.fields.CharField', [], {'max_length': '120'}),
- 'book': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'fragments'", 'to': "orm['catalogue.Book']"}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'short_text': ('django.db.models.fields.TextField', [], {}),
- 'text': ('django.db.models.fields.TextField', [], {})
- },
- 'catalogue.tag': {
- 'Meta': {'ordering': "('sort_key',)", 'unique_together': "(('slug', 'category'),)", 'object_name': 'Tag'},
- 'book_count': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}),
- 'category': ('django.db.models.fields.CharField', [], {'max_length': '50', 'db_index': 'True'}),
- 'changed_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'db_index': 'True', 'blank': 'True'}),
- 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'db_index': 'True', 'blank': 'True'}),
- 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
- 'gazeta_link': ('django.db.models.fields.CharField', [], {'max_length': '240', 'blank': 'True'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': '50', 'db_index': 'True'}),
- 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '120', 'db_index': 'True'}),
- 'sort_key': ('django.db.models.fields.CharField', [], {'max_length': '120', 'db_index': 'True'}),
- 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'blank': 'True'}),
- 'wiki_link': ('django.db.models.fields.CharField', [], {'max_length': '240', 'blank': 'True'})
- },
- 'catalogue.tagrelation': {
- 'Meta': {'unique_together': "(('tag', 'content_type', 'object_id'),)", 'object_name': 'TagRelation', 'db_table': "'catalogue_tag_relation'"},
- 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'object_id': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}),
- 'tag': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'items'", 'to': "orm['catalogue.Tag']"})
- },
- 'contenttypes.contenttype': {
- 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
- 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
- }
- }
-
- complete_apps = ['catalogue']
diff --git a/apps/catalogue/migrations/0022_auto__add_field_book_common_slug__add_unique_book_slug__del_unique_boo.py b/apps/catalogue/migrations/0022_auto__add_field_book_common_slug__add_unique_book_slug__del_unique_boo.py
deleted file mode 100644
index 75a1c99f4..000000000
--- a/apps/catalogue/migrations/0022_auto__add_field_book_common_slug__add_unique_book_slug__del_unique_boo.py
+++ /dev/null
@@ -1,137 +0,0 @@
-# encoding: utf-8
-import datetime
-from south.db import db
-from south.v2 import SchemaMigration
-from django.db import models
-
-class Migration(SchemaMigration):
-
- def forwards(self, orm):
-
- # Removing unique constraint on 'Book', fields ['slug', 'language']
- db.delete_unique('catalogue_book', ['slug', 'language'])
-
- # Adding field 'Book.common_slug'
- db.add_column('catalogue_book', 'common_slug', self.gf('django.db.models.fields.SlugField')(default='-', max_length=120, db_index=True), keep_default=False)
-
- # Adding unique constraint on 'Book', fields ['slug']
- db.create_unique('catalogue_book', ['slug'])
-
-
- def backwards(self, orm):
-
- # Removing unique constraint on 'Book', fields ['slug']
- db.delete_unique('catalogue_book', ['slug'])
-
- # Deleting field 'Book.common_slug'
- db.delete_column('catalogue_book', 'common_slug')
-
- # Adding unique constraint on 'Book', fields ['slug', 'language']
- db.create_unique('catalogue_book', ['slug', 'language'])
-
-
- models = {
- 'auth.group': {
- 'Meta': {'object_name': 'Group'},
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),
- 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
- },
- 'auth.permission': {
- 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'},
- 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
- 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
- },
- 'auth.user': {
- 'Meta': {'object_name': 'User'},
- 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
- 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
- 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
- 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
- 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
- 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
- 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
- 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
- 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
- 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}),
- 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})
- },
- 'catalogue.book': {
- 'Meta': {'ordering': "('sort_key',)", 'object_name': 'Book'},
- 'changed_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'db_index': 'True', 'blank': 'True'}),
- 'common_slug': ('django.db.models.fields.SlugField', [], {'max_length': '120', 'db_index': 'True'}),
- 'cover': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
- 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'db_index': 'True', 'blank': 'True'}),
- 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
- 'epub_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'}),
- 'extra_info': ('catalogue.fields.JSONField', [], {'default': "'{}'"}),
- 'gazeta_link': ('django.db.models.fields.CharField', [], {'max_length': '240', 'blank': 'True'}),
- 'html_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'language': ('django.db.models.fields.CharField', [], {'default': "'pol'", 'max_length': '3', 'db_index': 'True'}),
- 'mobi_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'}),
- 'parent': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'children'", 'null': 'True', 'to': "orm['catalogue.Book']"}),
- 'parent_number': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
- 'pdf_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'}),
- 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '120', 'db_index': 'True'}),
- 'sort_key': ('django.db.models.fields.CharField', [], {'max_length': '120', 'db_index': 'True'}),
- 'title': ('django.db.models.fields.CharField', [], {'max_length': '120'}),
- 'txt_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'}),
- 'wiki_link': ('django.db.models.fields.CharField', [], {'max_length': '240', 'blank': 'True'}),
- 'xml_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'})
- },
- 'catalogue.bookmedia': {
- 'Meta': {'ordering': "('type', 'name')", 'object_name': 'BookMedia'},
- 'book': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'media'", 'to': "orm['catalogue.Book']"}),
- 'extra_info': ('catalogue.fields.JSONField', [], {'default': "'{}'"}),
- 'file': ('catalogue.fields.OverwritingFileField', [], {'max_length': '100'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': "'100'"}),
- 'source_sha1': ('django.db.models.fields.CharField', [], {'max_length': '40', 'null': 'True', 'blank': 'True'}),
- 'type': ('django.db.models.fields.CharField', [], {'max_length': "'100'"}),
- 'uploaded_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'})
- },
- 'catalogue.fragment': {
- 'Meta': {'ordering': "('book', 'anchor')", 'object_name': 'Fragment'},
- 'anchor': ('django.db.models.fields.CharField', [], {'max_length': '120'}),
- 'book': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'fragments'", 'to': "orm['catalogue.Book']"}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'short_text': ('django.db.models.fields.TextField', [], {}),
- 'text': ('django.db.models.fields.TextField', [], {})
- },
- 'catalogue.tag': {
- 'Meta': {'ordering': "('sort_key',)", 'unique_together': "(('slug', 'category'),)", 'object_name': 'Tag'},
- 'book_count': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}),
- 'category': ('django.db.models.fields.CharField', [], {'max_length': '50', 'db_index': 'True'}),
- 'changed_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'db_index': 'True', 'blank': 'True'}),
- 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'db_index': 'True', 'blank': 'True'}),
- 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
- 'gazeta_link': ('django.db.models.fields.CharField', [], {'max_length': '240', 'blank': 'True'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': '50', 'db_index': 'True'}),
- 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '120', 'db_index': 'True'}),
- 'sort_key': ('django.db.models.fields.CharField', [], {'max_length': '120', 'db_index': 'True'}),
- 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'blank': 'True'}),
- 'wiki_link': ('django.db.models.fields.CharField', [], {'max_length': '240', 'blank': 'True'})
- },
- 'catalogue.tagrelation': {
- 'Meta': {'unique_together': "(('tag', 'content_type', 'object_id'),)", 'object_name': 'TagRelation', 'db_table': "'catalogue_tag_relation'"},
- 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'object_id': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}),
- 'tag': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'items'", 'to': "orm['catalogue.Tag']"})
- },
- 'contenttypes.contenttype': {
- 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
- 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
- }
- }
-
- complete_apps = ['catalogue']
diff --git a/apps/catalogue/migrations/0023_common_slug.py b/apps/catalogue/migrations/0023_common_slug.py
deleted file mode 100644
index 386314915..000000000
--- a/apps/catalogue/migrations/0023_common_slug.py
+++ /dev/null
@@ -1,123 +0,0 @@
-# encoding: utf-8
-import datetime
-from south.db import db
-from south.v2 import DataMigration
-from django.db import models
-
-class Migration(DataMigration):
-
- def forwards(self, orm):
- "Write your forwards methods here."
- orm.Book.objects.all().update(common_slug=models.F('slug'))
-
-
- def backwards(self, orm):
- "Write your backwards methods here."
- pass
-
-
- models = {
- 'auth.group': {
- 'Meta': {'object_name': 'Group'},
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),
- 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
- },
- 'auth.permission': {
- 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'},
- 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
- 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
- },
- 'auth.user': {
- 'Meta': {'object_name': 'User'},
- 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
- 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
- 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
- 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
- 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
- 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
- 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
- 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
- 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
- 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}),
- 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})
- },
- 'catalogue.book': {
- 'Meta': {'ordering': "('sort_key',)", 'object_name': 'Book'},
- 'changed_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'db_index': 'True', 'blank': 'True'}),
- 'common_slug': ('django.db.models.fields.SlugField', [], {'max_length': '120', 'db_index': 'True'}),
- 'cover': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
- 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'db_index': 'True', 'blank': 'True'}),
- 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
- 'epub_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'}),
- 'extra_info': ('catalogue.fields.JSONField', [], {'default': "'{}'"}),
- 'gazeta_link': ('django.db.models.fields.CharField', [], {'max_length': '240', 'blank': 'True'}),
- 'html_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'language': ('django.db.models.fields.CharField', [], {'default': "'pol'", 'max_length': '3', 'db_index': 'True'}),
- 'mobi_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'}),
- 'parent': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'children'", 'null': 'True', 'to': "orm['catalogue.Book']"}),
- 'parent_number': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
- 'pdf_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'}),
- 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '120', 'db_index': 'True'}),
- 'sort_key': ('django.db.models.fields.CharField', [], {'max_length': '120', 'db_index': 'True'}),
- 'title': ('django.db.models.fields.CharField', [], {'max_length': '120'}),
- 'txt_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'}),
- 'wiki_link': ('django.db.models.fields.CharField', [], {'max_length': '240', 'blank': 'True'}),
- 'xml_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'})
- },
- 'catalogue.bookmedia': {
- 'Meta': {'ordering': "('type', 'name')", 'object_name': 'BookMedia'},
- 'book': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'media'", 'to': "orm['catalogue.Book']"}),
- 'extra_info': ('catalogue.fields.JSONField', [], {'default': "'{}'"}),
- 'file': ('catalogue.fields.OverwritingFileField', [], {'max_length': '100'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': "'100'"}),
- 'source_sha1': ('django.db.models.fields.CharField', [], {'max_length': '40', 'null': 'True', 'blank': 'True'}),
- 'type': ('django.db.models.fields.CharField', [], {'max_length': "'100'"}),
- 'uploaded_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'})
- },
- 'catalogue.fragment': {
- 'Meta': {'ordering': "('book', 'anchor')", 'object_name': 'Fragment'},
- 'anchor': ('django.db.models.fields.CharField', [], {'max_length': '120'}),
- 'book': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'fragments'", 'to': "orm['catalogue.Book']"}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'short_text': ('django.db.models.fields.TextField', [], {}),
- 'text': ('django.db.models.fields.TextField', [], {})
- },
- 'catalogue.tag': {
- 'Meta': {'ordering': "('sort_key',)", 'unique_together': "(('slug', 'category'),)", 'object_name': 'Tag'},
- 'book_count': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}),
- 'category': ('django.db.models.fields.CharField', [], {'max_length': '50', 'db_index': 'True'}),
- 'changed_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'db_index': 'True', 'blank': 'True'}),
- 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'db_index': 'True', 'blank': 'True'}),
- 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
- 'gazeta_link': ('django.db.models.fields.CharField', [], {'max_length': '240', 'blank': 'True'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': '50', 'db_index': 'True'}),
- 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '120', 'db_index': 'True'}),
- 'sort_key': ('django.db.models.fields.CharField', [], {'max_length': '120', 'db_index': 'True'}),
- 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'blank': 'True'}),
- 'wiki_link': ('django.db.models.fields.CharField', [], {'max_length': '240', 'blank': 'True'})
- },
- 'catalogue.tagrelation': {
- 'Meta': {'unique_together': "(('tag', 'content_type', 'object_id'),)", 'object_name': 'TagRelation', 'db_table': "'catalogue_tag_relation'"},
- 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'object_id': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}),
- 'tag': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'items'", 'to': "orm['catalogue.Tag']"})
- },
- 'contenttypes.contenttype': {
- 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
- 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
- }
- }
-
- complete_apps = ['catalogue']
diff --git a/apps/catalogue/migrations/0024_auto__add_collection.py b/apps/catalogue/migrations/0024_auto__add_collection.py
deleted file mode 100644
index e2e21007d..000000000
--- a/apps/catalogue/migrations/0024_auto__add_collection.py
+++ /dev/null
@@ -1,138 +0,0 @@
-# encoding: utf-8
-import datetime
-from south.db import db
-from south.v2 import SchemaMigration
-from django.db import models
-
-class Migration(SchemaMigration):
-
- def forwards(self, orm):
-
- # Adding model 'Collection'
- db.create_table('catalogue_collection', (
- ('title', self.gf('django.db.models.fields.CharField')(max_length=120, db_index=True)),
- ('slug', self.gf('django.db.models.fields.SlugField')(max_length=120, primary_key=True, db_index=True)),
- ('description', self.gf('django.db.models.fields.TextField')(null=True, blank=True)),
- ('book_slugs', self.gf('django.db.models.fields.TextField')()),
- ))
- db.send_create_signal('catalogue', ['Collection'])
-
-
- def backwards(self, orm):
-
- # Deleting model 'Collection'
- db.delete_table('catalogue_collection')
-
-
- models = {
- 'auth.group': {
- 'Meta': {'object_name': 'Group'},
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),
- 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
- },
- 'auth.permission': {
- 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'},
- 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
- 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
- },
- 'auth.user': {
- 'Meta': {'object_name': 'User'},
- 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
- 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
- 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
- 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
- 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
- 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
- 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
- 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
- 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
- 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}),
- 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})
- },
- 'catalogue.book': {
- 'Meta': {'ordering': "('sort_key',)", 'object_name': 'Book'},
- 'changed_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'db_index': 'True', 'blank': 'True'}),
- 'common_slug': ('django.db.models.fields.SlugField', [], {'max_length': '120', 'db_index': 'True'}),
- 'cover': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
- 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'db_index': 'True', 'blank': 'True'}),
- 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
- 'epub_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'}),
- 'extra_info': ('catalogue.fields.JSONField', [], {'default': "'{}'"}),
- 'gazeta_link': ('django.db.models.fields.CharField', [], {'max_length': '240', 'blank': 'True'}),
- 'html_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'language': ('django.db.models.fields.CharField', [], {'default': "'pol'", 'max_length': '3', 'db_index': 'True'}),
- 'mobi_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'}),
- 'parent': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'children'", 'null': 'True', 'to': "orm['catalogue.Book']"}),
- 'parent_number': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
- 'pdf_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'}),
- 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '120', 'db_index': 'True'}),
- 'sort_key': ('django.db.models.fields.CharField', [], {'max_length': '120', 'db_index': 'True'}),
- 'title': ('django.db.models.fields.CharField', [], {'max_length': '120'}),
- 'txt_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'}),
- 'wiki_link': ('django.db.models.fields.CharField', [], {'max_length': '240', 'blank': 'True'}),
- 'xml_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'})
- },
- 'catalogue.bookmedia': {
- 'Meta': {'ordering': "('type', 'name')", 'object_name': 'BookMedia'},
- 'book': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'media'", 'to': "orm['catalogue.Book']"}),
- 'extra_info': ('catalogue.fields.JSONField', [], {'default': "'{}'"}),
- 'file': ('catalogue.fields.OverwritingFileField', [], {'max_length': '100'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': "'100'"}),
- 'source_sha1': ('django.db.models.fields.CharField', [], {'max_length': '40', 'null': 'True', 'blank': 'True'}),
- 'type': ('django.db.models.fields.CharField', [], {'max_length': "'100'"}),
- 'uploaded_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'})
- },
- 'catalogue.collection': {
- 'Meta': {'ordering': "('title',)", 'object_name': 'Collection'},
- 'book_slugs': ('django.db.models.fields.TextField', [], {}),
- 'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
- 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '120', 'primary_key': 'True', 'db_index': 'True'}),
- 'title': ('django.db.models.fields.CharField', [], {'max_length': '120', 'db_index': 'True'})
- },
- 'catalogue.fragment': {
- 'Meta': {'ordering': "('book', 'anchor')", 'object_name': 'Fragment'},
- 'anchor': ('django.db.models.fields.CharField', [], {'max_length': '120'}),
- 'book': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'fragments'", 'to': "orm['catalogue.Book']"}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'short_text': ('django.db.models.fields.TextField', [], {}),
- 'text': ('django.db.models.fields.TextField', [], {})
- },
- 'catalogue.tag': {
- 'Meta': {'ordering': "('sort_key',)", 'unique_together': "(('slug', 'category'),)", 'object_name': 'Tag'},
- 'book_count': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}),
- 'category': ('django.db.models.fields.CharField', [], {'max_length': '50', 'db_index': 'True'}),
- 'changed_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'db_index': 'True', 'blank': 'True'}),
- 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'db_index': 'True', 'blank': 'True'}),
- 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
- 'gazeta_link': ('django.db.models.fields.CharField', [], {'max_length': '240', 'blank': 'True'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': '50', 'db_index': 'True'}),
- 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '120', 'db_index': 'True'}),
- 'sort_key': ('django.db.models.fields.CharField', [], {'max_length': '120', 'db_index': 'True'}),
- 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'blank': 'True'}),
- 'wiki_link': ('django.db.models.fields.CharField', [], {'max_length': '240', 'blank': 'True'})
- },
- 'catalogue.tagrelation': {
- 'Meta': {'unique_together': "(('tag', 'content_type', 'object_id'),)", 'object_name': 'TagRelation', 'db_table': "'catalogue_tag_relation'"},
- 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'object_id': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}),
- 'tag': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'items'", 'to': "orm['catalogue.Tag']"})
- },
- 'contenttypes.contenttype': {
- 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
- 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
- }
- }
-
- complete_apps = ['catalogue']
diff --git a/apps/catalogue/migrations/0025_auto__add_field_book__related_info.py b/apps/catalogue/migrations/0025_auto__add_field_book__related_info.py
deleted file mode 100644
index a46e34d0e..000000000
--- a/apps/catalogue/migrations/0025_auto__add_field_book__related_info.py
+++ /dev/null
@@ -1,133 +0,0 @@
-# encoding: utf-8
-import datetime
-from south.db import db
-from south.v2 import SchemaMigration
-from django.db import models
-
-class Migration(SchemaMigration):
-
- def forwards(self, orm):
-
- # Adding field 'Book._related_info'
- db.add_column('catalogue_book', '_related_info', self.gf('jsonfield.fields.JSONField')(null=True, blank=True), keep_default=False)
-
-
- def backwards(self, orm):
-
- # Deleting field 'Book._related_info'
- db.delete_column('catalogue_book', '_related_info')
-
-
- models = {
- 'auth.group': {
- 'Meta': {'object_name': 'Group'},
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),
- 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
- },
- 'auth.permission': {
- 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'},
- 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
- 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
- },
- 'auth.user': {
- 'Meta': {'object_name': 'User'},
- 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
- 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
- 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
- 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
- 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
- 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
- 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
- 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
- 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
- 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}),
- 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})
- },
- 'catalogue.book': {
- 'Meta': {'ordering': "('sort_key',)", 'object_name': 'Book'},
- '_related_info': ('jsonfield.fields.JSONField', [], {'null': 'True', 'blank': 'True'}),
- 'changed_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'db_index': 'True', 'blank': 'True'}),
- 'common_slug': ('django.db.models.fields.SlugField', [], {'max_length': '120', 'db_index': 'True'}),
- 'cover': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
- 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'db_index': 'True', 'blank': 'True'}),
- 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
- 'epub_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'}),
- 'extra_info': ('catalogue.fields.JSONField', [], {'default': "'{}'"}),
- 'gazeta_link': ('django.db.models.fields.CharField', [], {'max_length': '240', 'blank': 'True'}),
- 'html_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'language': ('django.db.models.fields.CharField', [], {'default': "'pol'", 'max_length': '3', 'db_index': 'True'}),
- 'mobi_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'}),
- 'parent': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'children'", 'null': 'True', 'to': "orm['catalogue.Book']"}),
- 'parent_number': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
- 'pdf_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'}),
- 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '120', 'db_index': 'True'}),
- 'sort_key': ('django.db.models.fields.CharField', [], {'max_length': '120', 'db_index': 'True'}),
- 'title': ('django.db.models.fields.CharField', [], {'max_length': '120'}),
- 'txt_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'}),
- 'wiki_link': ('django.db.models.fields.CharField', [], {'max_length': '240', 'blank': 'True'}),
- 'xml_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'})
- },
- 'catalogue.bookmedia': {
- 'Meta': {'ordering': "('type', 'name')", 'object_name': 'BookMedia'},
- 'book': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'media'", 'to': "orm['catalogue.Book']"}),
- 'extra_info': ('catalogue.fields.JSONField', [], {'default': "'{}'"}),
- 'file': ('catalogue.fields.OverwritingFileField', [], {'max_length': '100'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': "'100'"}),
- 'source_sha1': ('django.db.models.fields.CharField', [], {'max_length': '40', 'null': 'True', 'blank': 'True'}),
- 'type': ('django.db.models.fields.CharField', [], {'max_length': "'100'"}),
- 'uploaded_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'})
- },
- 'catalogue.collection': {
- 'Meta': {'ordering': "('title',)", 'object_name': 'Collection'},
- 'book_slugs': ('django.db.models.fields.TextField', [], {}),
- 'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
- 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '120', 'primary_key': 'True', 'db_index': 'True'}),
- 'title': ('django.db.models.fields.CharField', [], {'max_length': '120', 'db_index': 'True'})
- },
- 'catalogue.fragment': {
- 'Meta': {'ordering': "('book', 'anchor')", 'object_name': 'Fragment'},
- 'anchor': ('django.db.models.fields.CharField', [], {'max_length': '120'}),
- 'book': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'fragments'", 'to': "orm['catalogue.Book']"}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'short_text': ('django.db.models.fields.TextField', [], {}),
- 'text': ('django.db.models.fields.TextField', [], {})
- },
- 'catalogue.tag': {
- 'Meta': {'ordering': "('sort_key',)", 'unique_together': "(('slug', 'category'),)", 'object_name': 'Tag'},
- 'book_count': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}),
- 'category': ('django.db.models.fields.CharField', [], {'max_length': '50', 'db_index': 'True'}),
- 'changed_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'db_index': 'True', 'blank': 'True'}),
- 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'db_index': 'True', 'blank': 'True'}),
- 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
- 'gazeta_link': ('django.db.models.fields.CharField', [], {'max_length': '240', 'blank': 'True'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': '50', 'db_index': 'True'}),
- 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '120', 'db_index': 'True'}),
- 'sort_key': ('django.db.models.fields.CharField', [], {'max_length': '120', 'db_index': 'True'}),
- 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'blank': 'True'}),
- 'wiki_link': ('django.db.models.fields.CharField', [], {'max_length': '240', 'blank': 'True'})
- },
- 'catalogue.tagrelation': {
- 'Meta': {'unique_together': "(('tag', 'content_type', 'object_id'),)", 'object_name': 'TagRelation', 'db_table': "'catalogue_tag_relation'"},
- 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'object_id': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}),
- 'tag': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'items'", 'to': "orm['catalogue.Tag']"})
- },
- 'contenttypes.contenttype': {
- 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
- 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
- }
- }
-
- complete_apps = ['catalogue']
diff --git a/apps/catalogue/migrations/0026_set_names.py b/apps/catalogue/migrations/0026_set_names.py
deleted file mode 100644
index 837e4d034..000000000
--- a/apps/catalogue/migrations/0026_set_names.py
+++ /dev/null
@@ -1,132 +0,0 @@
-# encoding: utf-8
-import datetime
-from south.db import db
-from south.v2 import DataMigration
-from django.db import models
-
-class Migration(DataMigration):
-
- def forwards(self, orm):
- "Write your forwards methods here."
- for tag in orm.Tag.objects.filter(category='set', name__contains=','):
- tag.name = tag.name.replace(', ', ' ').replace(',', ' ')
- tag.save()
-
-
- def backwards(self, orm):
- "Write your backwards methods here."
-
-
- models = {
- 'auth.group': {
- 'Meta': {'object_name': 'Group'},
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),
- 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
- },
- 'auth.permission': {
- 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'},
- 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
- 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
- },
- 'auth.user': {
- 'Meta': {'object_name': 'User'},
- 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
- 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
- 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
- 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
- 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
- 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
- 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
- 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
- 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
- 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}),
- 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})
- },
- 'catalogue.book': {
- 'Meta': {'ordering': "('sort_key',)", 'object_name': 'Book'},
- '_related_info': ('jsonfield.fields.JSONField', [], {'null': 'True', 'blank': 'True'}),
- 'changed_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'db_index': 'True', 'blank': 'True'}),
- 'common_slug': ('django.db.models.fields.SlugField', [], {'max_length': '120', 'db_index': 'True'}),
- 'cover': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
- 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'db_index': 'True', 'blank': 'True'}),
- 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
- 'epub_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'}),
- 'extra_info': ('catalogue.fields.JSONField', [], {'default': "'{}'"}),
- 'gazeta_link': ('django.db.models.fields.CharField', [], {'max_length': '240', 'blank': 'True'}),
- 'html_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'language': ('django.db.models.fields.CharField', [], {'default': "'pol'", 'max_length': '3', 'db_index': 'True'}),
- 'mobi_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'}),
- 'parent': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'children'", 'null': 'True', 'to': "orm['catalogue.Book']"}),
- 'parent_number': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
- 'pdf_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'}),
- 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '120', 'db_index': 'True'}),
- 'sort_key': ('django.db.models.fields.CharField', [], {'max_length': '120', 'db_index': 'True'}),
- 'title': ('django.db.models.fields.CharField', [], {'max_length': '120'}),
- 'txt_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'}),
- 'wiki_link': ('django.db.models.fields.CharField', [], {'max_length': '240', 'blank': 'True'}),
- 'xml_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100', 'blank': 'True'})
- },
- 'catalogue.bookmedia': {
- 'Meta': {'ordering': "('type', 'name')", 'object_name': 'BookMedia'},
- 'book': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'media'", 'to': "orm['catalogue.Book']"}),
- 'extra_info': ('catalogue.fields.JSONField', [], {'default': "'{}'"}),
- 'file': ('catalogue.fields.OverwritingFileField', [], {'max_length': '100'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': "'100'"}),
- 'source_sha1': ('django.db.models.fields.CharField', [], {'max_length': '40', 'null': 'True', 'blank': 'True'}),
- 'type': ('django.db.models.fields.CharField', [], {'max_length': "'100'"}),
- 'uploaded_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'})
- },
- 'catalogue.collection': {
- 'Meta': {'ordering': "('title',)", 'object_name': 'Collection'},
- 'book_slugs': ('django.db.models.fields.TextField', [], {}),
- 'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
- 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '120', 'primary_key': 'True', 'db_index': 'True'}),
- 'title': ('django.db.models.fields.CharField', [], {'max_length': '120', 'db_index': 'True'})
- },
- 'catalogue.fragment': {
- 'Meta': {'ordering': "('book', 'anchor')", 'object_name': 'Fragment'},
- 'anchor': ('django.db.models.fields.CharField', [], {'max_length': '120'}),
- 'book': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'fragments'", 'to': "orm['catalogue.Book']"}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'short_text': ('django.db.models.fields.TextField', [], {}),
- 'text': ('django.db.models.fields.TextField', [], {})
- },
- 'catalogue.tag': {
- 'Meta': {'ordering': "('sort_key',)", 'unique_together': "(('slug', 'category'),)", 'object_name': 'Tag'},
- 'book_count': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}),
- 'category': ('django.db.models.fields.CharField', [], {'max_length': '50', 'db_index': 'True'}),
- 'changed_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'db_index': 'True', 'blank': 'True'}),
- 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'db_index': 'True', 'blank': 'True'}),
- 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
- 'gazeta_link': ('django.db.models.fields.CharField', [], {'max_length': '240', 'blank': 'True'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': '50', 'db_index': 'True'}),
- 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '120', 'db_index': 'True'}),
- 'sort_key': ('django.db.models.fields.CharField', [], {'max_length': '120', 'db_index': 'True'}),
- 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'blank': 'True'}),
- 'wiki_link': ('django.db.models.fields.CharField', [], {'max_length': '240', 'blank': 'True'})
- },
- 'catalogue.tagrelation': {
- 'Meta': {'unique_together': "(('tag', 'content_type', 'object_id'),)", 'object_name': 'TagRelation', 'db_table': "'catalogue_tag_relation'"},
- 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'object_id': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}),
- 'tag': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'items'", 'to': "orm['catalogue.Tag']"})
- },
- 'contenttypes.contenttype': {
- 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
- 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
- }
- }
-
- complete_apps = ['catalogue']
diff --git a/apps/catalogue/models.py b/apps/catalogue/models.py
index ba1a5d203..72cbeda39 100644
--- a/apps/catalogue/models.py
+++ b/apps/catalogue/models.py
@@ -22,7 +22,7 @@ from django.conf import settings
from newtagging.models import TagBase, tags_updated
from newtagging import managers
-from catalogue.fields import JSONField, OverwritingFileField
+from catalogue.fields import OverwritingFileField
from catalogue.utils import create_zip, split_tags, truncate_html_words
from catalogue import tasks
import re
@@ -115,8 +115,8 @@ class Tag(TagBase):
objects = Book.tagged.with_all((self,)).order_by()
if self.category != 'set':
# eliminate descendants
- l_tags = Tag.objects.filter(slug__in=[book.book_tag_slug() for book in objects])
- descendants_keys = [book.pk for book in Book.tagged.with_any(l_tags)]
+ l_tags = Tag.objects.filter(slug__in=[book.book_tag_slug() for book in objects.iterator()])
+ descendants_keys = [book.pk for book in Book.tagged.with_any(l_tags).iterator()]
if descendants_keys:
objects = objects.exclude(pk__in=descendants_keys)
return objects.count()
@@ -226,7 +226,7 @@ class BookMedia(models.Model):
name = models.CharField(_('name'), max_length="100")
file = OverwritingFileField(_('file'), upload_to=book_upload_path())
uploaded_at = models.DateTimeField(_('creation date'), auto_now_add=True, editable=False)
- extra_info = JSONField(_('extra information'), default='{}', editable=False)
+ extra_info = jsonfield.JSONField(_('extra information'), default='{}', editable=False)
book = models.ForeignKey('Book', related_name='media')
source_sha1 = models.CharField(null=True, blank=True, max_length=40, editable=False)
@@ -258,9 +258,9 @@ class BookMedia(models.Model):
remove_zip("%s_%s" % (old.book.slug, old.type))
remove_zip("%s_%s" % (self.book.slug, self.type))
- extra_info = self.get_extra_info_value()
+ extra_info = self.extra_info
extra_info.update(self.read_meta())
- self.set_extra_info_value(extra_info)
+ self.extra_info = extra_info
self.source_sha1 = self.read_source_sha1(self.file.path, self.type)
return super(BookMedia, self).save(*args, **kwargs)
@@ -334,7 +334,7 @@ class Book(models.Model):
created_at = models.DateTimeField(_('creation date'), auto_now_add=True, db_index=True)
changed_at = models.DateTimeField(_('creation date'), auto_now=True, db_index=True)
parent_number = models.IntegerField(_('parent number'), default=0)
- extra_info = JSONField(_('extra information'), default='{}')
+ extra_info = jsonfield.JSONField(_('extra information'), default='{}')
gazeta_link = models.CharField(blank=True, max_length=240)
wiki_link = models.CharField(blank=True, max_length=240)
# files generated during publication
@@ -428,7 +428,7 @@ class Book(models.Model):
type(self).objects.filter(pk=self.pk).update(_related_info=None)
# Fragment.short_html relies on book's tags, so reset it here too
- for fragm in self.fragments.all():
+ for fragm in self.fragments.all().iterator():
fragm.reset_short_html()
def has_description(self):
@@ -545,14 +545,14 @@ class Book(models.Model):
def zip_format(format_):
def pretty_file_name(book):
return "%s/%s.%s" % (
- b.get_extra_info_value()['author'],
+ b.extra_info['author'],
b.slug,
format_)
field_name = "%s_file" % format_
books = Book.objects.filter(parent=None).exclude(**{field_name: ""})
paths = [(pretty_file_name(b), getattr(b, field_name).path)
- for b in books]
+ for b in books.iterator()]
return create_zip(paths,
getattr(settings, "ALL_%s_ZIP" % format_.upper()))
@@ -628,7 +628,7 @@ class Book(models.Model):
book.common_slug = book_info.variant_of.slug
else:
book.common_slug = book.slug
- book.set_extra_info_value(book_info.to_dict())
+ book.extra_info = book_info.to_dict()
book.save()
meta_tags = Tag.tags_from_info(book_info)
@@ -675,7 +675,7 @@ class Book(models.Model):
descendants_tags.update(child_book.tags)
child_book.tags = list(child_book.tags) + [book_tag]
child_book.save()
- for fragment in child_book.fragments.all():
+ for fragment in child_book.fragments.all().iterator():
fragment.tags = set(list(fragment.tags) + [book_tag])
book_descendants += list(child_book.children.all())
@@ -723,7 +723,7 @@ class Book(models.Model):
def related_themes(self):
theme_counter = self.theme_counter
- book_themes = Tag.objects.filter(pk__in=theme_counter.keys())
+ book_themes = list(Tag.objects.filter(pk__in=theme_counter.keys()))
for tag in book_themes:
tag.count = theme_counter[tag.pk]
return book_themes
@@ -747,10 +747,10 @@ class Book(models.Model):
if tags is None:
tags = {}
- for child in self.children.all().order_by():
+ for child in self.children.all().order_by().iterator():
for tag_pk, value in child.tag_counter.iteritems():
tags[tag_pk] = tags.get(tag_pk, 0) + value
- for tag in self.tags.exclude(category__in=('book', 'theme', 'set')).order_by():
+ for tag in self.tags.exclude(category__in=('book', 'theme', 'set')).order_by().iterator():
tags[tag.pk] = 1
if self.id:
@@ -776,8 +776,8 @@ class Book(models.Model):
if tags is None:
tags = {}
- for fragment in Fragment.tagged.with_any([self.book_tag()]).order_by():
- for tag in fragment.tags.filter(category='theme').order_by():
+ for fragment in Fragment.tagged.with_any([self.book_tag()]).order_by().iterator():
+ for tag in fragment.tags.filter(category='theme').order_by().iterator():
tags[tag.pk] = tags.get(tag.pk, 0) + 1
if self.id:
@@ -812,8 +812,9 @@ class Book(models.Model):
# get relevant books and their tags
objects = cls.tagged.with_all(tags)
# eliminate descendants
- l_tags = Tag.objects.filter(category='book', slug__in=[book.book_tag_slug() for book in objects])
- descendants_keys = [book.pk for book in cls.tagged.with_any(l_tags)]
+ l_tags = Tag.objects.filter(category='book',
+ slug__in=[book.book_tag_slug() for book in objects.iterator()])
+ descendants_keys = [book.pk for book in cls.tagged.with_any(l_tags).iterator()]
if descendants_keys:
objects = objects.exclude(pk__in=descendants_keys)
@@ -832,19 +833,20 @@ class Book(models.Model):
'title', 'parent', 'slug')
if filter:
books = books.filter(filter).distinct()
- book_ids = set((book.pk for book in books))
- for book in books:
+
+ book_ids = set(b['pk'] for b in books.values("pk").iterator())
+ for book in books.iterator():
parent = book.parent_id
if parent not in book_ids:
parent = None
books_by_parent.setdefault(parent, []).append(book)
else:
- for book in books:
+ for book in books.iterator():
books_by_parent.setdefault(book.parent_id, []).append(book)
orphans = []
books_by_author = SortedDict()
- for tag in Tag.objects.filter(category='author'):
+ for tag in Tag.objects.filter(category='author').iterator():
books_by_author[tag] = []
for book in books_by_parent.get(None,()):
@@ -866,7 +868,7 @@ class Book(models.Model):
"LP": (3, u"liceum"),
}
def audiences_pl(self):
- audiences = self.get_extra_info_value().get('audiences', [])
+ audiences = self.extra_info.get('audiences', [])
audiences = sorted(set([self._audiences_pl[a] for a in audiences]))
return [a[1] for a in audiences]
diff --git a/apps/catalogue/templates/catalogue/book_info.html b/apps/catalogue/templates/catalogue/book_info.html
index 670679e28..e9f351258 100755
--- a/apps/catalogue/templates/catalogue/book_info.html
+++ b/apps/catalogue/templates/catalogue/book_info.html
@@ -2,9 +2,9 @@
{% load catalogue_tags %}