title: How do I retrieve Email-ID from auth_user table in Django?
body: <p>How do I retrieve Email-ID from auth_user table in Django?
   I am getting only id and username if I access the auth_user table.</p>
  
  <h2>Models.py</h2>
  
  <pre><code>class AuthUser(models.Model):
  id = models.IntegerField(primary_key=True)
      password = models.CharField(max_length=128)
      last_login = models.DateTimeField()
      is_superuser = models.BooleanField()
      username = models.CharField(max_length=30, unique=True)
      first_name = models.CharField(max_length=30)
      last_name = models.CharField(max_length=30)
      email = models.CharField(max_length=75)
      is_staff = models.BooleanField()
      is_active = models.BooleanField()
      date_joined = models.DateTimeField()
  
  class Meta:
      db_table = 'auth_user'
  
  def as_json(self):
      return dict(
          user_id=self.id,
          username=self.username,
          email=self.email
      )
  </code></pre>
  
  <hr>
  
  <h2>views.py</h2>
  
  <pre><code>class UserViewSet(generics.ListCreateAPIView):
      serializer_class = AuthUserSerializer
  
      def get_queryset(self):
          q = self.kwargs['username']
          if q != '*':
              return AuthUser.objects.filter(username=q)
          else:
              return AuthUser.objects.all()
  </code></pre>
  
  <hr>
  
  <h2>urls.py</h2>
  
  <pre><code>url(r'^getUserData/(?P&lt;username&gt;.+)/$',
                                                    views.UserViewSet.as_view(),
                                                    name='user-details'),
  </code></pre>
  
  <hr>
  
  <p>I need only email from AuthUser object</p>