Browse Source

Allow to be overridden.

feature/python-error-tracking
Drew Larson 8 years ago
parent
commit
92ed978d33
  1. 21
      bikeshop_project/core/migrations/0002_auto_20170101_2054.py
  2. 2
      bikeshop_project/core/models.py

21
bikeshop_project/core/migrations/0002_auto_20170101_2054.py

@ -0,0 +1,21 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.9.7 on 2017-01-01 20:54
from __future__ import unicode_literals
from django.db import migrations, models
import django.utils.timezone
class Migration(migrations.Migration):
dependencies = [
('core', '0001_initial'),
]
operations = [
migrations.AlterField(
model_name='visit',
name='created_at',
field=models.DateTimeField(default=django.utils.timezone.now),
),
]

2
bikeshop_project/core/models.py

@ -67,7 +67,7 @@ class Visit(models.Model):
'registration.Member', 'registration.Member',
on_delete=models.CASCADE on_delete=models.CASCADE
) )
created_at = models.DateTimeField(auto_now_add=True) created_at = models.DateTimeField(default=timezone.now)
purpose = models.CharField(max_length=50, choices=visit_choices) purpose = models.CharField(max_length=50, choices=visit_choices)
def __str__(self): def __str__(self):

Loading…
Cancel
Save