('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'])
# 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'])
('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):
# 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 = {
'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'}),
},
'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'})
},