add catalog build_progress, show_prices, and master
This commit is contained in:
28
procat2/migrations/0005_auto_20190426_0503.py
Normal file
28
procat2/migrations/0005_auto_20190426_0503.py
Normal file
@ -0,0 +1,28 @@
|
||||
# Generated by Django 2.2 on 2019-04-26 05:03
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('procat2', '0004_auto_20190424_0000'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='catalog',
|
||||
name='build_progress',
|
||||
field=models.PositiveIntegerField(default=0),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='catalog',
|
||||
name='master',
|
||||
field=models.BooleanField(default=False),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='catalog',
|
||||
name='show_prices',
|
||||
field=models.BooleanField(default=False),
|
||||
),
|
||||
]
|
||||
@ -42,7 +42,9 @@ class Catalog(models.Model):
|
||||
sections = models.PositiveIntegerField(default=0)
|
||||
materials = models.PositiveIntegerField(default=0)
|
||||
data = JSONField(null=True)
|
||||
# build_progress = models.PositiveIntegerField(default=0)
|
||||
master = models.BooleanField(default=False)
|
||||
show_prices = models.BooleanField(default=False)
|
||||
build_progress = models.PositiveIntegerField(default=0)
|
||||
|
||||
# JSONField docs:
|
||||
# https://docs.djangoproject.com/en/2.2/ref/contrib/postgres/fields/#jsonfield
|
||||
@ -85,5 +87,8 @@ class Catalog(models.Model):
|
||||
'pages': self.pages,
|
||||
'sections': self.sections,
|
||||
'materials': self.materials,
|
||||
'master': self.master,
|
||||
'show_prices': self.show_prices,
|
||||
'build_progress': self.build_progress,
|
||||
'pdf': self.pdf_url(),
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user