title: Excluding the two types of users in django
body: <p>I have an application in django and wants in my view exclude anonymous users and users who are admins (those who have a flag superuser).</p>
  
  <p>I already have code that excludes anonymous users, but how else to put here users who are admins?</p>
  
  <p>My model</p>
  
  <pre><code>class MyModel(models.Model):
      user = models.ForeignKey(User, blank=True, null=True)
      name = models.CharField(max_length=255, blank=True, null=True)
  </code></pre>
  
  <p>Here is my query:</p>
  
  <pre><code>def get_queryset(self):
      return User.objects.all().exclude(id=settings.ANONYMOUS_USER_ID)
  </code></pre>