|
| 1 | +# Generated by Django 4.2.11 on 2024-07-04 14:19 |
| 2 | + |
| 3 | +import uuid |
| 4 | +from decimal import Decimal |
| 5 | + |
| 6 | +import django.core.validators |
| 7 | +from django.db import migrations, models |
| 8 | + |
| 9 | +import tinymce.models |
| 10 | + |
| 11 | +import csp_post_processor.fields |
| 12 | + |
| 13 | + |
| 14 | +class Migration(migrations.Migration): |
| 15 | + |
| 16 | + replaces = [ |
| 17 | + ("products", "0001_initial"), |
| 18 | + ("products", "0002_auto_20210521_1352"), |
| 19 | + ("products", "0003_auto_20210816_1635"), |
| 20 | + ("products", "0004_set_product_uuid"), |
| 21 | + ("products", "0005_auto_20210816_1639"), |
| 22 | + ("products", "0006_product_information"), |
| 23 | + ("products", "0007_auto_20220201_1213"), |
| 24 | + ("products", "0008_alter_product_price"), |
| 25 | + ] |
| 26 | + |
| 27 | + initial = True |
| 28 | + |
| 29 | + dependencies = [] |
| 30 | + |
| 31 | + operations = [ |
| 32 | + migrations.CreateModel( |
| 33 | + name="Product", |
| 34 | + fields=[ |
| 35 | + ( |
| 36 | + "id", |
| 37 | + models.AutoField( |
| 38 | + auto_created=True, |
| 39 | + primary_key=True, |
| 40 | + serialize=False, |
| 41 | + verbose_name="ID", |
| 42 | + ), |
| 43 | + ), |
| 44 | + ("name", models.CharField(max_length=50, verbose_name="name")), |
| 45 | + ( |
| 46 | + "price", |
| 47 | + models.DecimalField( |
| 48 | + decimal_places=2, |
| 49 | + max_digits=10, |
| 50 | + validators=[ |
| 51 | + django.core.validators.MinValueValidator(Decimal("0.01")) |
| 52 | + ], |
| 53 | + verbose_name="price", |
| 54 | + ), |
| 55 | + ), |
| 56 | + ( |
| 57 | + "uuid", |
| 58 | + models.UUIDField( |
| 59 | + default=uuid.uuid4, |
| 60 | + help_text="Globally unique identifier", |
| 61 | + unique=True, |
| 62 | + verbose_name="UUID", |
| 63 | + ), |
| 64 | + ), |
| 65 | + ( |
| 66 | + "information", |
| 67 | + csp_post_processor.fields.CSPPostProcessedWYSIWYGField( |
| 68 | + base_field=tinymce.models.HTMLField( |
| 69 | + blank=True, |
| 70 | + help_text="Information text to be displayed in the confirmation page and confirmation email.", |
| 71 | + verbose_name="information", |
| 72 | + ), |
| 73 | + blank=True, |
| 74 | + help_text="Information text to be displayed in the confirmation page and confirmation email.", |
| 75 | + verbose_name="information", |
| 76 | + ), |
| 77 | + ), |
| 78 | + ], |
| 79 | + options={ |
| 80 | + "verbose_name": "Product", |
| 81 | + "verbose_name_plural": "Products", |
| 82 | + }, |
| 83 | + ), |
| 84 | + ] |
0 commit comments