From 81083bf8c8a9aa4428be0f4d61ebcd8a1431502f Mon Sep 17 00:00:00 2001 From: Zak Timson Date: Thu, 14 Sep 2017 11:52:49 -0400 Subject: [PATCH] Fixed warnings --- expert_witnesses/models.py | 2 +- newsletters/models.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/expert_witnesses/models.py b/expert_witnesses/models.py index 623f9a8..9f1974a 100644 --- a/expert_witnesses/models.py +++ b/expert_witnesses/models.py @@ -15,7 +15,7 @@ class AreaOfExpertise(models.Model): class Expert(models.Model): - cases = models.ManyToManyField(Case, null=True, blank=True) + cases = models.ManyToManyField(Case) expertise = models.ManyToManyField(AreaOfExpertise) institute = models.CharField(max_length=255, null=True, blank=True) name = models.CharField(max_length=255) diff --git a/newsletters/models.py b/newsletters/models.py index 069e6a8..5aedf67 100644 --- a/newsletters/models.py +++ b/newsletters/models.py @@ -1,13 +1,13 @@ from django.db import models from django.contrib.auth.admin import User -from django.utils.timezone import now +from django.utils import timezone class Newsletter(models.Model): body = models.TextField() created = models.DateTimeField(auto_now_add=True) creator = models.ForeignKey(User) - publish = models.DateTimeField(default=now()) + publish = models.DateTimeField(default=timezone.now) sent = models.BooleanField(default=False) subject = models.CharField(max_length=255)