From 717a5c3194acdf44150402acbd3eda75719a6afd Mon Sep 17 00:00:00 2001 From: mcbloch Date: Tue, 12 Oct 2021 21:43:10 +0200 Subject: [PATCH] Fix migration for status --- mordor/migrations/0002_alter_order_state.py | 18 ++++++++++++++++++ mordor/models.py | 2 +- mordor/templates/mordor/manage.py | 1 + 3 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 mordor/migrations/0002_alter_order_state.py create mode 100644 mordor/templates/mordor/manage.py diff --git a/mordor/migrations/0002_alter_order_state.py b/mordor/migrations/0002_alter_order_state.py new file mode 100644 index 0000000..b7815e7 --- /dev/null +++ b/mordor/migrations/0002_alter_order_state.py @@ -0,0 +1,18 @@ +# Generated by Django 3.2.3 on 2021-10-12 19:37 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('mordor', '0001_initial'), + ] + + operations = [ + migrations.AlterField( + model_name='order', + name='state', + field=models.IntegerField(choices=[(0, 'open'), (1, 'besteld'), (2, 'geleverd'), (3, 'afgehaald')], default=0), + ), + ] diff --git a/mordor/models.py b/mordor/models.py index 64587c7..d413935 100644 --- a/mordor/models.py +++ b/mordor/models.py @@ -11,7 +11,7 @@ class TimeStampMixin(models.Model): class Order(TimeStampMixin): - OPEN, ORDERED, DELIVERED = range(3) + OPEN, ORDERED, DELIVERED, COLLECTED = range(4) ORDER_STATES = {OPEN: "open", ORDERED: "besteld", DELIVERED: "geleverd", COLLECTED: "afgehaald"} amount_33 = models.IntegerField(default=0, blank=True) diff --git a/mordor/templates/mordor/manage.py b/mordor/templates/mordor/manage.py new file mode 100644 index 0000000..4265cc3 --- /dev/null +++ b/mordor/templates/mordor/manage.py @@ -0,0 +1 @@ +#!/usr/bin/env python