summaryrefslogtreecommitdiff
path: root/app/photos/migrations/0001_initial.py
blob: a98bc977585ffef1bfa4d8131fc42d8e1c107408 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
# -*- coding: utf-8 -*-
# Generated by Django 1.9 on 2015-12-11 19:33
from __future__ import unicode_literals

import django.contrib.gis.db.models.fields
from django.db import migrations, models
import django.db.models.deletion
import photos.models
import taggit.managers


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('taggit', '0002_auto_20150616_2121'),
        ('locations', '__first__'),
    ]

    operations = [
        migrations.CreateModel(
            name='LuxGallery',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(blank=True, max_length=300)),
                ('description', models.TextField(blank=True, null=True)),
                ('slug', models.CharField(blank=True, max_length=300)),
                ('thumb', models.CharField(blank=True, max_length=300)),
                ('pub_date', models.DateTimeField(null=True)),
                ('point', django.contrib.gis.db.models.fields.PointField(blank=True, null=True, srid=4326)),
                ('is_public', models.BooleanField(default=True)),
            ],
            options={
                'verbose_name_plural': 'Galleries',
                'get_latest_by': 'pub_date',
                'ordering': ('-pub_date', 'id'),
            },
        ),
        migrations.CreateModel(
            name='LuxImage',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('image', models.FileField(blank=True, null=True, upload_to=photos.models.get_upload_path)),
                ('title', models.CharField(blank=True, max_length=300, null=True)),
                ('caption', models.TextField(blank=True, null=True)),
                ('pub_date', models.DateTimeField()),
                ('exif_raw', models.TextField(blank=True, null=True)),
                ('exif_aperture', models.CharField(blank=True, max_length=50, null=True)),
                ('exif_make', models.CharField(blank=True, max_length=50, null=True)),
                ('exif_model', models.CharField(blank=True, max_length=50, null=True)),
                ('exif_exposure', models.CharField(blank=True, max_length=50, null=True)),
                ('exif_iso', models.CharField(blank=True, max_length=50, null=True)),
                ('exif_focal_length', models.CharField(blank=True, max_length=50, null=True)),
                ('exif_lens', models.CharField(blank=True, max_length=50, null=True)),
                ('exif_date', models.DateTimeField(blank=True, null=True)),
                ('height', models.CharField(blank=True, max_length=6, null=True)),
                ('width', models.CharField(blank=True, max_length=6, null=True)),
                ('point', django.contrib.gis.db.models.fields.PointField(blank=True, null=True, srid=4326)),
                ('is_public', models.BooleanField(default=True)),
                ('is_video', models.BooleanField(default=False)),
                ('flickr_id', models.CharField(blank=True, max_length=80, null=True)),
                ('location', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='locations.Location')),
            ],
            options={
                'verbose_name_plural': 'Images',
                'get_latest_by': 'pub_date',
                'ordering': ('-pub_date', 'id'),
            },
        ),
        migrations.CreateModel(
            name='Photo',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('description', models.TextField(blank=True, null=True)),
                ('title', models.CharField(blank=True, max_length=300)),
                ('pub_date', models.DateTimeField()),
                ('exif_aperture', models.CharField(blank=True, max_length=50, null=True)),
                ('exif_make', models.CharField(blank=True, max_length=50, null=True)),
                ('exif_model', models.CharField(blank=True, max_length=50, null=True)),
                ('exif_exposure', models.CharField(blank=True, max_length=50, null=True)),
                ('exif_iso', models.CharField(blank=True, max_length=50, null=True)),
                ('exif_focal_length', models.CharField(blank=True, max_length=50, null=True)),
                ('exif_lens', models.CharField(blank=True, max_length=50, null=True)),
                ('exif_date', models.DateTimeField()),
                ('flickr_id', models.CharField(max_length=300)),
                ('flickr_owner', models.CharField(max_length=20)),
                ('flickr_server', models.IntegerField()),
                ('flickr_farm', models.IntegerField()),
                ('flickr_secret', models.CharField(max_length=50)),
                ('flickr_originalsecret', models.CharField(max_length=50)),
                ('lon', models.FloatField(help_text='Longitude of centerpoint', null=True, verbose_name='Longitude')),
                ('lat', models.FloatField(help_text='Latitude of centerpoint', null=True, verbose_name='Latitude')),
                ('slideshowimage_width', models.CharField(blank=True, max_length=4, null=True)),
                ('slideshowimage_height', models.CharField(blank=True, max_length=4, null=True)),
                ('slideshowimage_margintop', models.CharField(blank=True, max_length=4, null=True)),
                ('slideshowimage_marginleft', models.CharField(blank=True, max_length=4, null=True)),
                ('is_public', models.BooleanField(default=True)),
                ('location', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='locations.Location')),
                ('region', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='locations.Region')),
                ('tags', taggit.managers.TaggableManager(blank=True, help_text='A comma-separated list of tags.', through='taggit.TaggedItem', to='taggit.Tag', verbose_name='Tags')),
            ],
            options={
                'ordering': ('-pub_date',),
            },
        ),
        migrations.CreateModel(
            name='PhotoGallery',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('set_id', models.CharField(blank=True, max_length=300)),
                ('set_title', models.CharField(blank=True, max_length=300)),
                ('set_desc', models.TextField(blank=True, null=True)),
                ('set_slug', models.CharField(blank=True, max_length=300)),
                ('primary', models.CharField(blank=True, max_length=300)),
                ('pub_date', models.DateTimeField(null=True)),
                ('location', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='locations.Location')),
                ('photos', models.ManyToManyField(to='photos.Photo')),
                ('region', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='locations.Region')),
            ],
            options={
                'verbose_name_plural': 'Photo Galleries',
                'get_latest_by': 'pub_date',
                'ordering': ('-pub_date', 'id'),
            },
        ),
        migrations.AddField(
            model_name='luxgallery',
            name='image',
            field=models.ManyToManyField(to='photos.LuxImage'),
        ),
        migrations.AddField(
            model_name='luxgallery',
            name='location',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='locations.Location'),
        ),
    ]