Skip to content
This repository has been archived by the owner on Nov 4, 2024. It is now read-only.

Django Oscar Upgrade to version 3.2.2 #4068

Closed
wants to merge 31 commits into from
Closed
Show file tree
Hide file tree
Changes from 28 commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
4626bd8
chore: django oscar version upgrade to 3.1
zubair-ce07 Nov 12, 2023
a8acca8
fix: changed django migration to alter price field in stockrecord model
zubair-ce07 Nov 12, 2023
6f0b745
Merge branch 'master' into zubair-django-oscar31-update
zubair-ce07 Nov 14, 2023
28f8cb6
feat: add data migration to make voucher names unique
mumarkhan999 Nov 14, 2023
bd96751
fix: removed code
zubair-ce07 Nov 15, 2023
d56b082
Merge branch 'zubair-django-oscar31-update' of github.com:openedx/eco…
zubair-ce07 Nov 15, 2023
4ef8517
Merge branch 'master' into zubair-django-oscar31-update
zubair-ce07 Nov 15, 2023
cad553c
refactor: updated django oscar templates
zubair-ce07 Nov 16, 2023
ef3a5c4
Merge branch 'zubair-django-oscar31-update' of github.com:openedx/eco…
zubair-ce07 Nov 16, 2023
c68378a
Merge branch 'master' into zubair-django-oscar31-update
zubair-ce07 Nov 16, 2023
8fbe9ab
Merge branch 'master' into zubair-django-oscar31-update
zubair-ce07 Dec 5, 2023
3e6b2e6
refactor: updated price field name
zubair-ce07 Dec 5, 2023
e3860eb
refactor: update price field name
zubair-ce07 Dec 5, 2023
5345248
chore: PR to upgrade django oscar to version 3.2
zubair-ce07 Dec 5, 2023
8f96306
feat: resloved reserved keywords conflict
zubair-ce07 Dec 5, 2023
6ce075d
chore: update django oscar version to 3.2.2
zubair-ce07 Dec 6, 2023
375c449
feat: add data mmigration to make basket_lineattribute value json com…
mumarkhan999 Dec 7, 2023
009f9c1
chore: update django oscar version to 3.2.2
zubair-ce07 Dec 6, 2023
6b4c938
feat: add new migrations
mumarkhan999 Dec 12, 2023
f4eb20a
feat: add new migrations
mumarkhan999 Dec 13, 2023
b2aa8b7
Merge branch 'master' into zubair-django-oscar31-update
zubair-ce07 Jan 8, 2024
d3ea7c0
feat: added refund functionality
zubair-ce07 Jan 12, 2024
935f5ee
Merge branch 'zubair-django-oscar31-update' into zubair-django-oscar3…
zubair-ce07 Jan 15, 2024
d1249a9
Merge branch 'zubair-django-oscar32-update' into zubair-django-oscar3…
zubair-ce07 Jan 15, 2024
0c20f67
Merge branch 'master' into zubair-django-oscar32-update
zubair-ce07 Jan 16, 2024
b6ae5d1
Merge branch 'zubair-django-oscar32-update' into zubair-django-oscar3…
zubair-ce07 Jan 16, 2024
38db736
Merge branch 'zubair-django-oscar322-update' of github.com:openedx/ec…
zubair-ce07 Jan 23, 2024
b332bcb
fix: resolved UI issues in product add page
zubair-ce07 Jan 24, 2024
e9c5e6c
fix: resolved conflicts
zubair-ce07 Feb 2, 2024
40bbf5f
fix: removed migrations
zubair-ce07 Feb 2, 2024
ea3b6ea
feat: added migration
zubair-ce07 Feb 2, 2024
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
5 changes: 5 additions & 0 deletions db_keyword_overrides.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,10 @@ MYSQL:
- ShippingEvent.lines
- PaymentEvent.lines
- ProductAlert.key
- HistoricalOption.order
- Option.order
SNOWFLAKE:
- HistoricalOption.order
- Option.order

STITCH:
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# -*- coding: utf-8 -*-
from django.core.paginator import Paginator
from django.db import migrations


def make_lineattribute_value_json_compatible(apps, schema_editor):
"""
Makes line attribute value json compatible.
"""
LineAttribute = apps.get_model("basket", "LineAttribute")
attributes = LineAttribute.objects.order_by('id')
paginator = Paginator(attributes, 1000)

for page_number in paginator.page_range:
page = paginator.page(page_number)
updates = []

for obj in page.object_list:
obj.value = '"{}"'.format(obj.value)
updates.append(obj)

LineAttribute.objects.bulk_update(updates, ['value'])


class Migration(migrations.Migration):

dependencies = [
('basket', '0015_add_paymentintentid'),
]

operations = [
migrations.RunPython(make_lineattribute_value_json_compatible, migrations.RunPython.noop),
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Generated by Django 3.2.20 on 2023-12-05 10:34

import django.core.serializers.json
from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('basket', '0016_make_lineattribute_value_json_compatible'),
]

operations = [
migrations.AlterField(
model_name='lineattribute',
name='value',
field=models.JSONField(encoder=django.core.serializers.json.DjangoJSONEncoder, verbose_name='Value'),
),
]
18 changes: 18 additions & 0 deletions ecommerce/extensions/basket/migrations/0018_line_tax_code.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Generated by Django 3.2.20 on 2023-12-13 14:33

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('basket', '0017_alter_lineattribute_value'),
]

operations = [
migrations.AddField(
model_name='line',
name='tax_code',
field=models.CharField(blank=True, max_length=64, null=True, verbose_name='VAT rate code'),
),
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
# Generated by Django 3.2.20 on 2023-12-05 10:34

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


class Migration(migrations.Migration):

dependencies = [
('catalogue', '0056_auto_20231108_1355'),
]

operations = [
migrations.AlterModelOptions(
name='option',
options={'ordering': ['order', 'name'], 'verbose_name': 'Option', 'verbose_name_plural': 'Options'},
),
migrations.AddField(
model_name='historicaloption',
name='help_text',
field=models.CharField(blank=True, help_text='Help text shown to the user on the add to basket form', max_length=255, null=True, verbose_name='Help text'),
),
migrations.AddField(
model_name='historicaloption',
name='option_group',
field=models.ForeignKey(blank=True, db_constraint=False, help_text='Select an option group if using type "Option" or "Multi Option"', null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='catalogue.attributeoptiongroup', verbose_name='Option Group'),
),
migrations.AddField(
model_name='historicaloption',
name='order',
field=models.IntegerField(blank=True, db_index=True, help_text='Controls the ordering of product options on product detail pages', null=True, verbose_name='Ordering'),
),
migrations.AddField(
model_name='option',
name='help_text',
field=models.CharField(blank=True, help_text='Help text shown to the user on the add to basket form', max_length=255, null=True, verbose_name='Help text'),
),
migrations.AddField(
model_name='option',
name='option_group',
field=models.ForeignKey(blank=True, help_text='Select an option group if using type "Option" or "Multi Option"', null=True, on_delete=django.db.models.deletion.CASCADE, related_name='product_options', to='catalogue.attributeoptiongroup', verbose_name='Option Group'),
),
migrations.AddField(
model_name='option',
name='order',
field=models.IntegerField(blank=True, db_index=True, help_text='Controls the ordering of product options on product detail pages', null=True, verbose_name='Ordering'),
),
migrations.AlterField(
model_name='historicaloption',
name='type',
field=models.CharField(choices=[('text', 'Text'), ('integer', 'Integer'), ('boolean', 'True / False'), ('float', 'Float'), ('date', 'Date'), ('select', 'Select'), ('radio', 'Radio'), ('multi_select', 'Multi select'), ('checkbox', 'Checkbox')], default='text', max_length=255, verbose_name='Type'),
),
migrations.AlterField(
model_name='historicalproduct',
name='slug',
field=oscar.models.fields.slugfield.SlugField(allow_unicode=True, max_length=255, verbose_name='Slug'),
),
migrations.AlterField(
model_name='option',
name='type',
field=models.CharField(choices=[('text', 'Text'), ('integer', 'Integer'), ('boolean', 'True / False'), ('float', 'Float'), ('date', 'Date'), ('select', 'Select'), ('radio', 'Radio'), ('multi_select', 'Multi select'), ('checkbox', 'Checkbox')], default='text', max_length=255, verbose_name='Type'),
),
migrations.AlterField(
model_name='product',
name='slug',
field=oscar.models.fields.slugfield.SlugField(allow_unicode=True, max_length=255, verbose_name='Slug'),
),
migrations.AlterUniqueTogether(
name='productattribute',
unique_together={('code', 'product_class')},
),
]
28 changes: 28 additions & 0 deletions ecommerce/extensions/offer/migrations/0056_auto_20231212_1249.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Generated by Django 3.2.20 on 2023-12-12 12:49

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('offer', '0055_auto_20231108_1355'),
]

operations = [
migrations.AddField(
model_name='rangeproductfileupload',
name='upload_type',
field=models.CharField(choices=[('included', 'Included products upload'), ('excluded', 'Excluded products upload')], default='included', max_length=8),
),
migrations.AlterField(
model_name='historicalrange',
name='description',
field=models.TextField(blank=True, verbose_name='Description'),
),
migrations.AlterField(
model_name='range',
name='description',
field=models.TextField(blank=True, verbose_name='Description'),
),
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Generated by Django 3.2.20 on 2023-12-05 10:34

import django.core.serializers.json
from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('order', '0026_auto_20231108_1355'),
]

operations = [
migrations.AlterField(
model_name='lineattribute',
name='value',
field=models.JSONField(encoder=django.core.serializers.json.DjangoJSONEncoder, verbose_name='Value'),
),
]
47 changes: 47 additions & 0 deletions ecommerce/extensions/order/migrations/0028_auto_20231212_1249.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# Generated by Django 3.2.20 on 2023-12-12 12:49

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('order', '0027_alter_lineattribute_value'),
]

operations = [
migrations.AlterModelOptions(
name='surcharge',
options={'ordering': ['pk'], 'verbose_name': 'Surcharge', 'verbose_name_plural': 'Surcharges'},
),
migrations.AddField(
model_name='historicalline',
name='tax_code',
field=models.CharField(blank=True, max_length=64, null=True, verbose_name='VAT rate code'),
),
migrations.AddField(
model_name='historicalorder',
name='shipping_tax_code',
field=models.CharField(blank=True, max_length=64, null=True, verbose_name='Shipping VAT rate code'),
),
migrations.AddField(
model_name='line',
name='tax_code',
field=models.CharField(blank=True, max_length=64, null=True, verbose_name='VAT rate code'),
),
migrations.AddField(
model_name='lineprice',
name='tax_code',
field=models.CharField(blank=True, max_length=64, null=True, verbose_name='VAT rate code'),
),
migrations.AddField(
model_name='order',
name='shipping_tax_code',
field=models.CharField(blank=True, max_length=64, null=True, verbose_name='Shipping VAT rate code'),
),
migrations.AddField(
model_name='surcharge',
name='tax_code',
field=models.CharField(blank=True, max_length=64, null=True, verbose_name='VAT rate code'),
),
]
Loading
Loading