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)