from django.db import models
from django.utils import timezone


class TaskExecution(models.Model):
    time = models.DateTimeField(default=timezone.now)
    key = models.CharField(max_length=256)
    execution_number = models.IntegerField()

    class Meta:
        unique_together = ('key', 'execution_number')

    def __unicode__(self):
        return '%s:%s' % (self.key, self.time)

from django.db import models
from django.utils import timezone


class TaskExecution(models.Model):
    time = models.DateTimeField(default=timezone.now)
    key = models.CharField(max_length=256)
    execution_number = models.IntegerField()

    class Meta:
        unique_together = ('key', 'execution_number')
        app_label = 'jitishcron'

    def __unicode__(self):
        return '%s:%s' % (self.key, self.time)

Add app_label to jitishcron TaskExecution model
Add app_label to jitishcron TaskExecution model

The TaskExecution model is loaded before apps are done loading, which in
Django 1.9 will no longer be permitted unless the model explicitly
specifies an app_label.

  from django.db import models
  from django.utils import timezone
  
  
  class TaskExecution(models.Model):
      time = models.DateTimeField(default=timezone.now)
      key = models.CharField(max_length=256)
      execution_number = models.IntegerField()
  
      class Meta:
          unique_together = ('key', 'execution_number')
+         app_label = 'jitishcron'
  
      def __unicode__(self):
          return '%s:%s' % (self.key, self.time)
  
Add app_label to jitishcron TaskExecution model
## Code Before:
from django.db import models
from django.utils import timezone


class TaskExecution(models.Model):
    time = models.DateTimeField(default=timezone.now)
    key = models.CharField(max_length=256)
    execution_number = models.IntegerField()

    class Meta:
        unique_together = ('key', 'execution_number')

    def __unicode__(self):
        return '%s:%s' % (self.key, self.time)

## Instruction:
Add app_label to jitishcron TaskExecution model
## Code After:
from django.db import models
from django.utils import timezone


class TaskExecution(models.Model):
    time = models.DateTimeField(default=timezone.now)
    key = models.CharField(max_length=256)
    execution_number = models.IntegerField()

    class Meta:
        unique_together = ('key', 'execution_number')
        app_label = 'jitishcron'

    def __unicode__(self):
        return '%s:%s' % (self.key, self.time)
