title: Django : RelatedObjectDoesNotExist in view but works fine in Admin
body: <p>I am getting a (RelatedObjectDoesNotExist: UserProfile has no site) error in one of my views yet I am able to perform all CRUD operations in the admin with out any errors. </p>
  
  <pre><code>django.db.models.fields.related_descriptors.RelatedObjectDoesNotExist: UserProfile has no site.
  </code></pre>
  
  <p>Excerpt from models.py</p>
  
  <pre><code> class Sites(models.Model):
       name = models.CharField(max_length=255, blank=True, null=True)
       active = models.NullBooleanField()
       created_at = models.DateTimeField(blank=True, null=True)
       updated_at = models.DateTimeField(blank=True, null=True)
       logo_file_name = models.CharField(max_length=255, blank=True, null=True)
       logo_content_type = models.CharField(max_length=255, blank=True, null=True)
       logo_file_size = models.IntegerField(blank=True, null=True)
       logo_updated_at = models.DateTimeField(blank=True, null=True)
       logo_path = models.CharField(max_length=255, blank=True, null=True)
       account_type = models.CharField(max_length=255, blank=True, null=True)
  
       def __str__(self):
           site_str = 'id = {}, name = {}'.format(self.id, self.name)
           return site_str
  
       class Meta:
           managed = True
           db_table = 'sites'
  
  
   class UserProfile(models.Model):
       user = models.OneToOneField(settings.AUTH_USER_MODEL,
                                   on_delete=models.CASCADE)
       site = models.ForeignKey(Sites)
  
       def __str__(self):
           user_profile_str = '{}: {}'.format(self.user.username, str(self.site))
           return user_profile_str
  </code></pre>
  
  <p>Excerpt form views.py</p>
  
  <pre><code> @login_required
   def client_list(request):
       user_profile = UserProfile(user=request.user)
       print(user_profile.user.username)
       clients = Clients.objects.filter(site_rec=user_profile.site)
       return render(request, 'snapreport/clients/all_clients.html', {'clients': clients})
  </code></pre>