From 185f52b01f5b5195f9d79e9e6219acdd8d847367 Mon Sep 17 00:00:00 2001 From: "Christopher C. Wells" Date: Thu, 18 Apr 2019 19:55:55 -0700 Subject: [PATCH] Fix linting issues. --- babybuddy/models.py | 7 ++++--- core/models.py | 6 +++++- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/babybuddy/models.py b/babybuddy/models.py index c9c952c6..97636c31 100644 --- a/babybuddy/models.py +++ b/babybuddy/models.py @@ -7,7 +7,8 @@ from django.db.models.signals import post_save from django.dispatch import receiver from django.utils.timezone import timedelta from django.utils.text import format_lazy -from django.utils.translation import activate, gettext_lazy as _, LANGUAGE_SESSION_KEY +from django.utils import translation +from django.utils.translation import gettext_lazy as _ from rest_framework.authtoken.models import Token @@ -77,5 +78,5 @@ def save_user_settings(sender, instance, **kwargs): @receiver(user_logged_in) def user_logged_in_callback(sender, request, user, **kwargs): - activate(user.settings.language) - request.session[LANGUAGE_SESSION_KEY] = user.settings.language + translation.activate(user.settings.language) + request.session[translation.LANGUAGE_SESSION_KEY] = user.settings.language diff --git a/core/models.py b/core/models.py index af97338d..0acc3123 100644 --- a/core/models.py +++ b/core/models.py @@ -121,7 +121,11 @@ class DiaperChange(models.Model): related_name='diaper_change', verbose_name=_('Child') ) - time = models.DateTimeField(blank=False, null=False, verbose_name=_('Time')) + time = models.DateTimeField( + blank=False, + null=False, + verbose_name=_('Time') + ) wet = models.BooleanField(verbose_name=_('Wet')) solid = models.BooleanField(verbose_name=_('Solid')) color = models.CharField(