Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. # -*- coding: utf-8 -*-
  2. import datetime
  3. from south.db import db
  4. from south.v2 import SchemaMigration
  5. from django.db import models
  6. class Migration(SchemaMigration):
  7. def forwards(self, orm):
  8. # Adding model 'Image'
  9. db.create_table(u'django_images_image', (
  10. (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
  11. ('image', self.gf('django.db.models.fields.files.ImageField')(max_length=255)),
  12. ('height', self.gf('django.db.models.fields.PositiveIntegerField')(default=0)),
  13. ('width', self.gf('django.db.models.fields.PositiveIntegerField')(default=0)),
  14. ))
  15. db.send_create_signal(u'django_images', ['Image'])
  16. # Adding model 'Thumbnail'
  17. db.create_table(u'django_images_thumbnail', (
  18. (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
  19. ('original', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['django_images.Image'])),
  20. ('image', self.gf('django.db.models.fields.files.ImageField')(max_length=255)),
  21. ('size', self.gf('django.db.models.fields.CharField')(max_length=100)),
  22. ('height', self.gf('django.db.models.fields.PositiveIntegerField')(default=0)),
  23. ('width', self.gf('django.db.models.fields.PositiveIntegerField')(default=0)),
  24. ))
  25. db.send_create_signal(u'django_images', ['Thumbnail'])
  26. # Adding unique constraint on 'Thumbnail', fields ['image', 'size']
  27. db.create_unique(u'django_images_thumbnail', ['image', 'size'])
  28. def backwards(self, orm):
  29. # Removing unique constraint on 'Thumbnail', fields ['image', 'size']
  30. db.delete_unique(u'django_images_thumbnail', ['image', 'size'])
  31. # Deleting model 'Image'
  32. db.delete_table(u'django_images_image')
  33. # Deleting model 'Thumbnail'
  34. db.delete_table(u'django_images_thumbnail')
  35. models = {
  36. u'django_images.image': {
  37. 'Meta': {'object_name': 'Image'},
  38. 'height': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
  39. u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
  40. 'image': ('django.db.models.fields.files.ImageField', [], {'max_length': '255'}),
  41. 'width': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'})
  42. },
  43. u'django_images.thumbnail': {
  44. 'Meta': {'unique_together': "(('image', 'size'),)", 'object_name': 'Thumbnail'},
  45. 'height': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
  46. u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
  47. 'image': ('django.db.models.fields.files.ImageField', [], {'max_length': '255'}),
  48. 'original': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['django_images.Image']"}),
  49. 'size': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
  50. 'width': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'})
  51. }
  52. }
  53. complete_apps = ['django_images']