]> git.sommitrealweird.co.uk Git - sommitrealweird.git/blob - sommitrealweird/photo/migrations/0001_initial.py
Update for newer django
[sommitrealweird.git] / sommitrealweird / photo / migrations / 0001_initial.py
1 # -*- coding: utf-8 -*-
2 # Generated by Django 1.10.7 on 2017-06-22 09:40
3 from __future__ import unicode_literals
4
5 from django.db import migrations, models
6 import django.db.models.deletion
7 import photo.models
8
9
10 class Migration(migrations.Migration):
11
12     initial = True
13
14     dependencies = [
15     ]
16
17     operations = [
18         migrations.CreateModel(
19             name='Album',
20             fields=[
21                 ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
22                 ('name', models.CharField(max_length=120)),
23                 ('caption', models.TextField(blank=True, null=True)),
24                 ('slug', models.SlugField()),
25             ],
26         ),
27         migrations.CreateModel(
28             name='Photo',
29             fields=[
30                 ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
31                 ('image', models.ImageField(null=True, upload_to=photo.models.get_upload_path)),
32                 ('caption', models.TextField(blank=True, null=True)),
33                 ('order', models.IntegerField(blank=True, null=True)),
34                 ('album', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='photo.Album')),
35             ],
36         ),
37     ]