title: Django query returning multiple users instead of one
body: <p>On my dashboard I'm querying a profile model that has a one to one relationship with user model. But instead of getting one user since there is only one profile per user, I'm getting all users in the database and one profile. I could probably work around the issue but from a security perspective I'm concerned about somehow getting all users from database. I checked the database fields and everything is OK so problem is with the code. Here's the code:</p>
  
  <pre><code>class Profile(models.Model):
    user = models.OneToOneField(User, on_delete=models.CASCADE)
    firstname = models.CharField(max_length=100, blank=True)
    lastname = models.CharField(max_length=100, blank=True)
    city = models.CharField(max_length=100, blank=True)
  
  @receiver(post_save, sender=User)
  def create_user_profile(sender, instance, created, **kwargs):
   if created:
      Profile.objects.create(user=instance)
  
  @receiver(post_save, sender=User)
  def save_user_profile(sender, instance, **kwargs):
     instance.profile.save()
  </code></pre>
  
  <p>Here's the code for form:</p>
  
  <pre><code>class ProfileForm(forms.ModelForm):
   class Meta:
      model = Profile
      exclude = ['afield', 'anotherfield']
      labels = {
          'user': _('User Name'),
          'firstname': _('First Name'),
          'lastname': _('Last Name'),
          'city': _('City'),
  </code></pre>
  
  <p>Here's the view:</p>
  
  <pre><code>@login_required
  def buy_subscription(request):
   if request.user.is_authenticated:
      if request.method == "POST":
          form = ProfileForm(request.POST, instance=request.user.profile)
          if form.is_valid():
              form.save()
      else:
              form = ProfileForm(instance=request.user.profile)
      return render(request, 'dashboard/mypage.html', {'form': form})
  else:
      return redirect("login/")
  </code></pre>
  
  <p>Template is standard:</p>
  
  <pre><code>{% for field in form %}
  {% render_field field  class="form-control" %}
  {% endfor %}
  </code></pre>
  
  <p>Here's what I'm getting on the html side:</p>
  
  <pre><code>&lt;select name="user" class="form-control" required id="id_user"&gt;
  &lt;option value=""&gt;---------&lt;/option&gt;
  &lt;option value="61"&gt;User1&lt;/option&gt;
  &lt;option value="62"&gt;User2&lt;/option&gt;
  &lt;option value="63" selected&gt;User3&lt;/option&gt;
  &lt;/select&gt;
  </code></pre>