From 00a772da314fe9f2181b27a6e6e33a2ce010ad63 Mon Sep 17 00:00:00 2001 From: Jorran de Wit <jorrandewit@outlook.com> Date: Wed, 1 Feb 2017 12:35:01 +0100 Subject: [PATCH] Add custom AutoNowField Due to potential data loss during migrations with the use of `auto_now`, it is recommended to write create a custom auto-now-field. --- scipost/global_methods.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scipost/global_methods.py b/scipost/global_methods.py index 1115ac33f..3510aef9e 100644 --- a/scipost/global_methods.py +++ b/scipost/global_methods.py @@ -1,9 +1,10 @@ -from django.contrib.auth.models import User +from .models import Contributor -from .models import * class Global(object): + ''' Is this thing really being used?''' @classmethod def get_contributor(cls, request): + '''This should be fixed within the user model itself?''' Contributor.objects.get(user=request.user) -- GitLab