title: Can I add custom middleware in django?
body: <p>I have implemented user login todo app in django. Can I add a custom middleware if I want to is it not needed to add middleware or where else can I use the middleware in which scenarios?</p>
  <pre class="lang-py prettyprint-override"><code>from django.db import models
  from django.utils import timezone
  
  class Todo(models.Model):
      title=models.CharField(max_length=100)
      details=models.TextField()
      date=models.DateTimeField(default=timezone.now)
  
      def __str__(self):
          return self.title&lt;/pre&gt;
  </code></pre>