Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/migrations-checker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest
services:
postgres:
image: kiasaki/alpine-postgres:9.5
image: postgres:17
env:
POSTGRES_USER: primzel_store
POSTGRES_PASSWORD: primzel_store
Expand Down
4 changes: 2 additions & 2 deletions apps/catalogue/apps.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import oscar.apps.catalogue.apps as apps
from django.conf.urls import url
from django.urls import path
from oscar.core.loading import get_class


Expand All @@ -12,7 +12,7 @@ def ready(self):

def get_urls(self):
urls = [
url(r'^(?P<product_slug>[\w-]*)_(?P<pk>\d+)/quick$',
path('(?P<product_slug>[\w-]*)_(?P<pk>\d+)/quick',
self.quick_detail_view.as_view(template_name='oscar/catalogue/partials/product_quick_view.html',
enforce_paths=False), name='quick_detail')
]
Expand Down
31 changes: 17 additions & 14 deletions apps/catalogue/migrations/0001_initial.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals

from django.db import models, migrations
import oscar.models.fields.autoslugfield
import django.db.models.deletion
import django.core.validators
import oscar.models.fields
import oscar.models.fields.autoslugfield
from django.conf import settings
from django.db import models, migrations
from django.utils.module_loading import import_string

models_AutoField = import_string(settings.DEFAULT_AUTO_FIELD)


class Migration(migrations.Migration):
Expand All @@ -18,7 +21,7 @@ class Migration(migrations.Migration):
migrations.CreateModel(
name='AttributeOption',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('id', models_AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('option', models.CharField(max_length=255, verbose_name='Option')),
],
options={
Expand All @@ -31,7 +34,7 @@ class Migration(migrations.Migration):
migrations.CreateModel(
name='AttributeOptionGroup',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('id', models_AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(max_length=128, verbose_name='Name')),
],
options={
Expand All @@ -44,7 +47,7 @@ class Migration(migrations.Migration):
migrations.CreateModel(
name='Category',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('id', models_AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('path', models.CharField(unique=True, max_length=255)),
('depth', models.PositiveIntegerField()),
('numchild', models.PositiveIntegerField(default=0)),
Expand All @@ -65,7 +68,7 @@ class Migration(migrations.Migration):
migrations.CreateModel(
name='Option',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('id', models_AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(max_length=128, verbose_name='Name')),
('code', oscar.models.fields.autoslugfield.AutoSlugField(populate_from='name', unique=True, verbose_name='Code', max_length=128, editable=False, blank=True)),
('type', models.CharField(default='Required', max_length=128, verbose_name='Status', choices=[('Required', 'Required - a value for this option must be specified'), ('Optional', 'Optional - a value for this option can be omitted')])),
Expand All @@ -80,7 +83,7 @@ class Migration(migrations.Migration):
migrations.CreateModel(
name='Product',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('id', models_AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('structure', models.CharField(default='standalone', max_length=10, verbose_name='Product structure', choices=[('standalone', 'Stand-alone product'), ('parent', 'Parent product'), ('child', 'Child product')])),
('upc', oscar.models.fields.NullCharField(unique=True, verbose_name='UPC', max_length=64, help_text='Universal Product Code (UPC) is an identifier for a product which is not specific to a particular supplier. Eg an ISBN for a book.')),
('title', models.CharField(max_length=255, verbose_name='Title', blank=True)),
Expand All @@ -102,7 +105,7 @@ class Migration(migrations.Migration):
migrations.CreateModel(
name='ProductAttribute',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('id', models_AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(max_length=128, verbose_name='Name')),
('code', models.SlugField(max_length=128, verbose_name='Code', validators=[django.core.validators.RegexValidator(regex='^[a-zA-Z\\-_][0-9a-zA-Z\\-_]*$', message="Code can only contain the letters a-z, A-Z, digits, minus and underscores, and can't start with a digit")])),
('type', models.CharField(default='text', max_length=20, verbose_name='Type', choices=[('text', 'Text'), ('integer', 'Integer'), ('boolean', 'True / False'), ('float', 'Float'), ('richtext', 'Rich Text'), ('date', 'Date'), ('option', 'Option'), ('entity', 'Entity'), ('file', 'File'), ('image', 'Image')])),
Expand All @@ -120,7 +123,7 @@ class Migration(migrations.Migration):
migrations.CreateModel(
name='ProductAttributeValue',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('id', models_AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('value_text', models.TextField(blank=True, verbose_name='Text', null=True)),
('value_integer', models.IntegerField(blank=True, verbose_name='Integer', null=True)),
('value_boolean', models.NullBooleanField(verbose_name='Boolean')),
Expand All @@ -145,7 +148,7 @@ class Migration(migrations.Migration):
migrations.CreateModel(
name='ProductCategory',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('id', models_AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('category', models.ForeignKey(verbose_name='Category', to='catalogue.Category', on_delete=models.CASCADE)),
('product', models.ForeignKey(verbose_name='Product', to='catalogue.Product', on_delete=models.CASCADE)),
],
Expand All @@ -160,7 +163,7 @@ class Migration(migrations.Migration):
migrations.CreateModel(
name='ProductClass',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('id', models_AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(max_length=128, verbose_name='Name')),
('slug', oscar.models.fields.autoslugfield.AutoSlugField(populate_from='name', unique=True, verbose_name='Slug', max_length=128, editable=False, blank=True)),
('requires_shipping', models.BooleanField(default=True, verbose_name='Requires shipping?')),
Expand All @@ -178,7 +181,7 @@ class Migration(migrations.Migration):
migrations.CreateModel(
name='ProductImage',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('id', models_AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('original', models.ImageField(upload_to='images/products/%Y/%m/', max_length=255, verbose_name='Original')),
('caption', models.CharField(max_length=200, verbose_name='Caption', blank=True)),
('display_order', models.PositiveIntegerField(default=0, verbose_name='Display order', help_text='An image with a display order of zero will be the primary image for a product')),
Expand All @@ -196,7 +199,7 @@ class Migration(migrations.Migration):
migrations.CreateModel(
name='ProductRecommendation',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('id', models_AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('ranking', models.PositiveSmallIntegerField(default=0, verbose_name='Ranking', help_text='Determines order of the products. A product with a higher value will appear before one with a lower ranking.')),
('primary', models.ForeignKey(verbose_name='Primary product', related_name='primary_recommendations', to='catalogue.Product', on_delete=models.CASCADE)),
('recommendation', models.ForeignKey(verbose_name='Recommended product', to='catalogue.Product', on_delete=models.CASCADE)),
Expand Down
2 changes: 1 addition & 1 deletion apps/catalogue/migrations/0002_auto_20150217_1221.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals

from django.db import models, migrations
from django.db import migrations


class Migration(migrations.Migration):
Expand Down
3 changes: 1 addition & 2 deletions apps/catalogue/migrations/0003_data_migration_slugs.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals

from django.db import models, migrations

from django.db import migrations
from oscar.core.loading import get_model

# Django database migrations require us to fetch the category model
Expand Down
2 changes: 1 addition & 1 deletion apps/catalogue/migrations/0005_auto_20150604_1450.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals

from django.db import models, migrations
import django.db.models.deletion
from django.db import models, migrations


class Migration(migrations.Migration):
Expand Down
2 changes: 1 addition & 1 deletion apps/catalogue/migrations/0006_auto_20150807_1725.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals

from django.db import models, migrations
import django.core.validators
import oscar.core.validators
from django.db import models, migrations


class Migration(migrations.Migration):
Expand Down
2 changes: 1 addition & 1 deletion apps/catalogue/migrations/0007_auto_20151207_1440.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals

from django.db import migrations, models
from django.db import migrations


class Migration(migrations.Migration):
Expand Down
2 changes: 1 addition & 1 deletion apps/catalogue/migrations/0008_auto_20160304_1652.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals

from django.db import migrations, models
import django.core.validators
import oscar.core.validators
from django.db import migrations, models


class Migration(migrations.Migration):
Expand Down
2 changes: 1 addition & 1 deletion apps/catalogue/migrations/0009_slugfield_noop.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
# Generated by Django 1.9.7 on 2016-07-13 08:44
from __future__ import unicode_literals

from django.db import migrations
import oscar.models.fields.slugfield
from django.db import migrations


class Migration(migrations.Migration):
Expand Down
2 changes: 1 addition & 1 deletion apps/catalogue/migrations/0010_auto_20170420_0439.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
# Generated by Django 1.11 on 2017-04-20 05:51
from __future__ import unicode_literals

from django.db import migrations, models
import django.db.models.deletion
from django.db import migrations, models


class Migration(migrations.Migration):
Expand Down
2 changes: 1 addition & 1 deletion apps/catalogue/migrations/0013_auto_20170821_1548.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
# Generated by Django 1.11.4 on 2017-08-21 14:48
from __future__ import unicode_literals

from django.db import migrations, models
import django.db.models.deletion
from django.db import migrations, models


class Migration(migrations.Migration):
Expand Down
29 changes: 29 additions & 0 deletions apps/catalogue/migrations/0017_auto_20190816_0938.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Generated by Django 2.2.4 on 2019-08-16 08:38

import oscar.utils.models
from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('catalogue', '0016_auto_20190327_0757'),
]

operations = [
migrations.AlterField(
model_name='productattributevalue',
name='value_file',
field=models.FileField(blank=True, max_length=255, null=True, upload_to=oscar.utils.models.get_image_upload_path),
),
migrations.AlterField(
model_name='productattributevalue',
name='value_image',
field=models.ImageField(blank=True, max_length=255, null=True, upload_to=oscar.utils.models.get_image_upload_path),
),
migrations.AlterField(
model_name='productimage',
name='original',
field=models.ImageField(max_length=255, upload_to=oscar.utils.models.get_image_upload_path, verbose_name='Original'),
),
]
18 changes: 0 additions & 18 deletions apps/catalogue/migrations/0017_auto_20210225_1829.py

This file was deleted.

28 changes: 28 additions & 0 deletions apps/catalogue/migrations/0018_auto_20191220_0920.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Generated by Django 2.2.9 on 2019-12-20 09:20

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('catalogue', '0017_auto_20190816_0938'),
]

operations = [
migrations.AddField(
model_name='category',
name='ancestors_are_public',
field=models.BooleanField(db_index=True, default=True, help_text='The ancestors of this category are public', verbose_name='Ancestor categories are public'),
),
migrations.AddField(
model_name='category',
name='is_public',
field=models.BooleanField(db_index=True, default=True, help_text='Show this category in search results and catalogue listings.', verbose_name='Is public'),
),
migrations.AlterField(
model_name='product',
name='is_public',
field=models.BooleanField(db_index=True, default=True, help_text='Show this product in search results and catalogue listings.', verbose_name='Is public'),
),
]
Loading