diff --git a/bikeshop_project/bike/migrations/0005_auto_20170202_0345.py b/bikeshop_project/bike/migrations/0005_auto_20170202_0345.py new file mode 100644 index 0000000..b3f25d7 --- /dev/null +++ b/bikeshop_project/bike/migrations/0005_auto_20170202_0345.py @@ -0,0 +1,26 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.10.4 on 2017-02-02 03:45 +from __future__ import unicode_literals + +from django.db import migrations, models +import django.utils.timezone + + +class Migration(migrations.Migration): + + dependencies = [ + ('bike', '0004_auto_20170129_2220'), + ] + + operations = [ + migrations.AlterField( + model_name='bike', + name='donated_at', + field=models.DateField(default=django.utils.timezone.now), + ), + migrations.AlterField( + model_name='bike', + name='donated_by', + field=models.TextField(blank=True, null=True), + ), + ] diff --git a/bikeshop_project/bike/migrations/0006_auto_20170202_0349.py b/bikeshop_project/bike/migrations/0006_auto_20170202_0349.py new file mode 100644 index 0000000..414910c --- /dev/null +++ b/bikeshop_project/bike/migrations/0006_auto_20170202_0349.py @@ -0,0 +1,21 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.10.4 on 2017-02-02 03:49 +from __future__ import unicode_literals + +from django.db import migrations, models +import django.utils.timezone + + +class Migration(migrations.Migration): + + dependencies = [ + ('bike', '0005_auto_20170202_0345'), + ] + + operations = [ + migrations.AlterField( + model_name='bike', + name='donated_at', + field=models.DateTimeField(default=django.utils.timezone.now), + ), + ] diff --git a/bikeshop_project/bike/models.py b/bikeshop_project/bike/models.py index 6ea2d4b..bc97c16 100644 --- a/bikeshop_project/bike/models.py +++ b/bikeshop_project/bike/models.py @@ -62,8 +62,8 @@ class Bike(models.Model): claimed_by = models.ForeignKey(Member, on_delete=models.SET_NULL, null=True, related_name='claimed_bike') stolen = models.NullBooleanField() purchased_by = models.ForeignKey(Member, on_delete=models.SET_NULL, null=True, related_name='purchased_bike') - donated_by = models.TextField() - donated_at = models.DateField(blank=False, null=False) + donated_by = models.TextField(blank=True, null=True) + donated_at = models.DateTimeField(blank=False, null=False, default=timezone.now) created_at = models.DateTimeField(default=timezone.now) modified_at = models.DateTimeField(auto_now=True) cpic_searched_at = models.DateTimeField(blank=True, null=True)