renamed scheduled task result to 'last run'. Makes more sense

This commit is contained in:
Ilan Steemers
2015-06-27 21:54:09 +02:00
parent 7fd381319c
commit 9bd3b1fa40
2 changed files with 3 additions and 3 deletions

View File

@@ -66,7 +66,7 @@ class ScheduleAdmin(admin.ModelAdmin):
'schedule_type',
'repeats',
'next_run',
'result',
'last_run',
'success'
)

View File

@@ -109,7 +109,7 @@ class Schedule(models.Model):
next_run = models.DateTimeField(verbose_name=_('Next Run'), default=timezone.now, null=True)
task = models.CharField(max_length=100, editable=False, null=True)
def result(self):
def last_run(self):
if Task.objects.filter(name=self.task).exists():
task = Task.objects.get(name=self.task)
if task.success:
@@ -125,7 +125,7 @@ class Schedule(models.Model):
return Task.objects.get(name=self.task).success
success.boolean = True
result.allow_tags = True
last_run.allow_tags = True
class Meta:
app_label = 'django_q'