Commit 64d185e4 authored by Aymeric's avatar Aymeric

fix bad default value in patient model

parent 5892d234
# Generated by Django 2.1.2 on 2018-10-25 09:13
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('dashboard', '0001_initial'),
]
operations = [
migrations.AlterField(
model_name='patient',
name='created_at',
field=models.DateField(auto_now_add=True),
),
migrations.AlterField(
model_name='patient',
name='date_of_birth',
field=models.DateField(),
),
]
from django.db import models
from datetime import datetime
from django.contrib.auth.models import User
......@@ -10,8 +9,8 @@ class Doctor(User):
class Patient(models.Model):
first_name = models.CharField(max_length=30)
last_name = models.CharField(max_length=30)
date_of_birth = models.DateField(default=datetime.now())
created_at = models.DateField(default=datetime.now())
date_of_birth = models.DateField()
created_at = models.DateField(auto_now_add=True)
doctor = models.ForeignKey(Doctor, on_delete=models.DO_NOTHING)
def __str__(self):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment