選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。
 
 
 
 
 
 

39 行
1.6 KiB

  1. # -*- coding: utf-8 -*-
  2. from __future__ import unicode_literals
  3. from django.db import migrations, models
  4. import django_images.models
  5. class Migration(migrations.Migration):
  6. dependencies = [
  7. ]
  8. operations = [
  9. migrations.CreateModel(
  10. name='Image',
  11. fields=[
  12. ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
  13. ('image', models.ImageField(height_field=b'height', width_field=b'width', max_length=255, upload_to=django_images.models.hashed_upload_to)),
  14. ('height', models.PositiveIntegerField(default=0, editable=False)),
  15. ('width', models.PositiveIntegerField(default=0, editable=False)),
  16. ],
  17. ),
  18. migrations.CreateModel(
  19. name='Thumbnail',
  20. fields=[
  21. ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
  22. ('image', models.ImageField(height_field=b'height', width_field=b'width', max_length=255, upload_to=django_images.models.hashed_upload_to)),
  23. ('size', models.CharField(max_length=100)),
  24. ('height', models.PositiveIntegerField(default=0, editable=False)),
  25. ('width', models.PositiveIntegerField(default=0, editable=False)),
  26. ('original', models.ForeignKey(to='django_images.Image', on_delete=models.CASCADE)),
  27. ],
  28. ),
  29. migrations.AlterUniqueTogether(
  30. name='thumbnail',
  31. unique_together=set([('original', 'size')]),
  32. ),
  33. ]