kopia lustrzana https://github.com/longclawshop/longclaw
91 wiersze
4.0 KiB
Python
91 wiersze
4.0 KiB
Python
|
# -*- coding: utf-8 -*-
|
||
|
# Generated by Django 1.10.4 on 2017-02-06 09:49
|
||
|
from __future__ import unicode_literals
|
||
|
|
||
|
from django.db import migrations, models
|
||
|
import django.db.models.deletion
|
||
|
import django_extensions.db.fields
|
||
|
import modelcluster.contrib.taggit
|
||
|
import modelcluster.fields
|
||
|
import wagtail.wagtailcore.fields
|
||
|
|
||
|
|
||
|
class Migration(migrations.Migration):
|
||
|
|
||
|
initial = True
|
||
|
|
||
|
dependencies = [
|
||
|
('taggit', '0002_auto_20150616_2121'),
|
||
|
('wagtailcore', '0030_index_on_pagerevision_created_at'),
|
||
|
('wagtailimages', '0015_fill_filter_spec_field'),
|
||
|
]
|
||
|
|
||
|
operations = [
|
||
|
migrations.CreateModel(
|
||
|
name='Product',
|
||
|
fields=[
|
||
|
('page_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='wagtailcore.Page')),
|
||
|
('description', wagtail.wagtailcore.fields.RichTextField()),
|
||
|
],
|
||
|
options={
|
||
|
'abstract': False,
|
||
|
},
|
||
|
bases=('wagtailcore.page',),
|
||
|
),
|
||
|
migrations.CreateModel(
|
||
|
name='ProductImage',
|
||
|
fields=[
|
||
|
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||
|
('sort_order', models.IntegerField(blank=True, editable=False, null=True)),
|
||
|
('caption', models.CharField(blank=True, max_length=255)),
|
||
|
('image', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='+', to='wagtailimages.Image')),
|
||
|
('product', modelcluster.fields.ParentalKey(on_delete=django.db.models.deletion.CASCADE, related_name='images', to='longclawproducts.Product')),
|
||
|
],
|
||
|
options={
|
||
|
'ordering': ['sort_order'],
|
||
|
'abstract': False,
|
||
|
},
|
||
|
),
|
||
|
migrations.CreateModel(
|
||
|
name='ProductIndex',
|
||
|
fields=[
|
||
|
('page_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='wagtailcore.Page')),
|
||
|
],
|
||
|
options={
|
||
|
'abstract': False,
|
||
|
},
|
||
|
bases=('wagtailcore.page',),
|
||
|
),
|
||
|
migrations.CreateModel(
|
||
|
name='ProductTag',
|
||
|
fields=[
|
||
|
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||
|
('content_object', modelcluster.fields.ParentalKey(on_delete=django.db.models.deletion.CASCADE, related_name='tagged_items', to='longclawproducts.Product')),
|
||
|
('tag', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='longclawproducts_producttag_items', to='taggit.Tag')),
|
||
|
],
|
||
|
options={
|
||
|
'abstract': False,
|
||
|
},
|
||
|
),
|
||
|
migrations.CreateModel(
|
||
|
name='ProductVariant',
|
||
|
fields=[
|
||
|
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||
|
('price', models.DecimalField(decimal_places=2, max_digits=12)),
|
||
|
('ref', models.CharField(max_length=32)),
|
||
|
('slug', django_extensions.db.fields.AutoSlugField(blank=True, editable=False, populate_from=('product', 'ref'), separator='')),
|
||
|
('description', wagtail.wagtailcore.fields.RichTextField()),
|
||
|
('stock', models.IntegerField(default=0)),
|
||
|
('product', modelcluster.fields.ParentalKey(on_delete=django.db.models.deletion.CASCADE, related_name='variants', to='longclawproducts.Product')),
|
||
|
],
|
||
|
options={
|
||
|
'abstract': False,
|
||
|
},
|
||
|
),
|
||
|
migrations.AddField(
|
||
|
model_name='product',
|
||
|
name='tags',
|
||
|
field=modelcluster.contrib.taggit.ClusterTaggableManager(blank=True, help_text='A comma-separated list of tags.', through='longclawproducts.ProductTag', to='taggit.Tag', verbose_name='Tags'),
|
||
|
),
|
||
|
]
|