mirror of https://github.com/snachodog/mybuddy.git
Linting fixes.
This commit is contained in:
parent
410e6c9e48
commit
23acc006d4
|
@ -1,3 +0,0 @@
|
|||
from django.test import TestCase
|
||||
|
||||
# Create your tests here.
|
|
@ -133,5 +133,3 @@ class Command(BaseCommand):
|
|||
milestone=milestone
|
||||
).save()
|
||||
start = end
|
||||
|
||||
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from datetime import timedelta
|
||||
|
||||
from django import template
|
||||
|
||||
from core.models import Timer
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
from django.test import TestCase
|
||||
|
||||
# Create your tests here.
|
11
core/urls.py
11
core/urls.py
|
@ -23,8 +23,8 @@ urlpatterns = [
|
|||
name='diaperchange-add'),
|
||||
url(r'^changes/(?P<pk>[0-9]+)/$', views.DiaperChangeUpdate.as_view(),
|
||||
name='diaperchange-update'),
|
||||
url(r'^changes/(?P<pk>[0-9]+)/delete/$', views.DiaperChangeDelete.as_view(),
|
||||
name='diaperchange-delete'),
|
||||
url(r'^changes/(?P<pk>[0-9]+)/delete/$',
|
||||
views.DiaperChangeDelete.as_view(), name='diaperchange-delete'),
|
||||
|
||||
url(r'^feedings/$', views.FeedingList.as_view(), name='feeding-list'),
|
||||
url(r'^feedings/add/$', views.FeedingAdd.as_view(), name='feeding-add'),
|
||||
|
@ -55,11 +55,12 @@ urlpatterns = [
|
|||
url(r'^timer/(?P<pk>[0-9]+)/delete/$', views.TimerDelete.as_view(),
|
||||
name='timer-delete'),
|
||||
|
||||
url(r'^tummy-time/$', views.TummyTimeList.as_view(), name='tummytime-list'),
|
||||
url(r'^tummy-time/$', views.TummyTimeList.as_view(),
|
||||
name='tummytime-list'),
|
||||
url(r'^tummy-time/add/$', views.TummyTimeAdd.as_view(),
|
||||
name='tummytime-add'),
|
||||
url(r'^tummy-time/(?P<pk>[0-9]+)/$', views.TummyTimeUpdate.as_view(),
|
||||
name='tummytime-update'),
|
||||
url(r'^tummy-time/(?P<pk>[0-9]+)/delete/$', views.TummyTimeDelete.as_view(),
|
||||
name='tummytime-delete'),
|
||||
url(r'^tummy-time/(?P<pk>[0-9]+)/delete/$',
|
||||
views.TummyTimeDelete.as_view(), name='tummytime-delete'),
|
||||
]
|
||||
|
|
|
@ -61,9 +61,13 @@ def card_tummytime_last(child):
|
|||
def card_tummytime_day(child, date=timezone.now().date()):
|
||||
instances = TummyTime.objects.filter(
|
||||
child=child, end__day=date.day).order_by('-end')
|
||||
stats = {'total': timezone.timedelta(seconds=0), 'count': instances.count()}
|
||||
stats = {
|
||||
'total': timezone.timedelta(seconds=0),
|
||||
'count': instances.count()
|
||||
}
|
||||
for instance in instances:
|
||||
stats['total'] += timezone.timedelta(seconds=instance.duration_td().seconds)
|
||||
stats['total'] += timezone.timedelta(
|
||||
seconds=instance.duration_td().seconds)
|
||||
return {'stats': stats, 'instances': instances, 'last': instances.first()}
|
||||
|
||||
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
from django.test import TestCase
|
||||
|
||||
# Create your tests here.
|
|
@ -15,7 +15,7 @@ gulp.task('lint:python', function(cb) {
|
|||
[
|
||||
'run',
|
||||
'flake8',
|
||||
'--exclude=node_modules,migrations'
|
||||
'--exclude=migrations,manage.py,node_modules,settings'
|
||||
],
|
||||
{
|
||||
stdio: 'inherit'
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
from django.test import TestCase
|
||||
|
||||
# Create your tests here.
|
Loading…
Reference in New Issue