title: type object 'UserProfile' has no attribute 'objects'
body: <p>I have this model:</p>
  
  <pre><code>class UserProfile(models.Model):
      user = models.OneToOneField(User)
  
      def __str__(self):
          return self.user.first_name
  </code></pre>
  
  <p>and in admin:</p>
  
  <pre><code>@admin.register(MyModel)
  class MyModelAdmin(admin.ModelAdmin):
  
      list_display = ('name', "is_active")
      list_filter = ('name',)
      fields = ('name', "status")
  
  
      def get_queryset(self, request):
          qs = super(MyModelAdmin, self).get_queryset(request)
          if request.user.is_superuser:
              return qs
  
          user_profile = UserProfile.objects.get(user = request.user)
  
          if user_profile:
              return qs.filter(id = 1)
  
          return qs.filter(id=None)
  </code></pre>
  
  <p>I do not understand why object 'UserProfile' has no attribute 'objects'. How can I get object UserProfile where user from UserProfile is current user?</p>