title: Django Consecutive Days and Max Consecutive days Query
body: <p>I have a following model.</p>
  <pre><code>class CategoryModel(BaseModel):
      name = models.CharField(max_length=100)
      icon = models.ImageField(upload_to=upload_icon_image_to)
      description = models.CharField(max_length=100)
      user = models.ForeignKey(User,on_delete=models.CasCade)
  
      def __str__(self):
          return self.name
  </code></pre>
  <p>The basic idea is that whenever a user added a category In one day whether being 1 or 20 records it is regarded as 1 streak and if the user again adds a new category then it is regarded as a +1 streak so current streak will be 2 and max streak is also 2 if user consecutively adds for 5 days streak is 5 days as it is max streak.</p>
  <p>I just want to display as</p>
  <pre><code>{
  &quot;current_streak&quot;:3,
  &quot;max_streak&quot;:12
  }
  </code></pre>
  <p>here current streak is 3 but previous streak set was 12 so it regarded as max streak
  Any Idea how I can achieve this query?</p>