Browse Source

Might as well make field a datetime.

feature/bike-tracking
Drew Larson 8 years ago
parent
commit
3f9e7faec6
  1. 26
      bikeshop_project/bike/migrations/0005_auto_20170202_0345.py
  2. 21
      bikeshop_project/bike/migrations/0006_auto_20170202_0349.py
  3. 4
      bikeshop_project/bike/models.py

26
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),
),
]

21
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),
),
]

4
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') claimed_by = models.ForeignKey(Member, on_delete=models.SET_NULL, null=True, related_name='claimed_bike')
stolen = models.NullBooleanField() stolen = models.NullBooleanField()
purchased_by = models.ForeignKey(Member, on_delete=models.SET_NULL, null=True, related_name='purchased_bike') purchased_by = models.ForeignKey(Member, on_delete=models.SET_NULL, null=True, related_name='purchased_bike')
donated_by = models.TextField() donated_by = models.TextField(blank=True, null=True)
donated_at = models.DateField(blank=False, null=False) donated_at = models.DateTimeField(blank=False, null=False, default=timezone.now)
created_at = models.DateTimeField(default=timezone.now) created_at = models.DateTimeField(default=timezone.now)
modified_at = models.DateTimeField(auto_now=True) modified_at = models.DateTimeField(auto_now=True)
cpic_searched_at = models.DateTimeField(blank=True, null=True) cpic_searched_at = models.DateTimeField(blank=True, null=True)

Loading…
Cancel
Save