diff --git a/production/admin.py b/production/admin.py index dd9a7849156ceb3587952caa48f7a02584bd386f..7969db8ec5fb3bbc2427fc3751b86fc871763e62 100644 --- a/production/admin.py +++ b/production/admin.py @@ -10,6 +10,7 @@ def event_count(obj): class ProductionEventInline(admin.TabularInline): model = ProductionEvent extra = 1 + readonly_fields = () class ProductionStreamAdmin(admin.ModelAdmin): diff --git a/production/migrations/0009_auto_20170701_1356.py b/production/migrations/0009_auto_20170701_1356.py new file mode 100644 index 0000000000000000000000000000000000000000..9aa834befe8297f68135a13d1799b90375d50d78 --- /dev/null +++ b/production/migrations/0009_auto_20170701_1356.py @@ -0,0 +1,21 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.10.3 on 2017-07-01 11:56 +from __future__ import unicode_literals + +from django.db import migrations, models +import django.utils.timezone + + +class Migration(migrations.Migration): + + dependencies = [ + ('production', '0008_auto_20170623_0833'), + ] + + operations = [ + migrations.AlterField( + model_name='productionevent', + name='noted_on', + field=models.DateTimeField(default=django.utils.timezone.now), + ), + ] diff --git a/production/models.py b/production/models.py index 6e11ce0e181c9a7abce5f3f592a1593c0cfbb262..6b515e8c2b2f8c2c11e8396f6969210cb5554106 100644 --- a/production/models.py +++ b/production/models.py @@ -38,7 +38,7 @@ class ProductionEvent(models.Model): stream = models.ForeignKey(ProductionStream, on_delete=models.CASCADE) event = models.CharField(max_length=64, choices=PRODUCTION_EVENTS) comments = models.TextField(blank=True, null=True) - noted_on = models.DateTimeField(auto_now_add=True) + noted_on = models.DateTimeField(default=timezone.now) noted_by = models.ForeignKey(Contributor, on_delete=models.CASCADE) duration = models.DurationField(blank=True, null=True) diff --git a/scipost/migrations/0059_auto_20170701_1356.py b/scipost/migrations/0059_auto_20170701_1356.py new file mode 100644 index 0000000000000000000000000000000000000000..de6151cfd5103244b72b6b101fca52cfa1077d4d --- /dev/null +++ b/scipost/migrations/0059_auto_20170701_1356.py @@ -0,0 +1,19 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.10.3 on 2017-07-01 11:56 +from __future__ import unicode_literals + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('scipost', '0058_auto_20170624_2003'), + ] + + operations = [ + migrations.AlterModelOptions( + name='unavailabilityperiod', + options={'ordering': ['-start']}, + ), + ]