title: objects.all() query not working
body: <p>I am trying to make a form for user creation through django. The user(henceforth developer) can choose from a list of supervisors to get himself registered. Problem is, I am not getting the list of all the supervisors from the query. When I use objects.get(), I receive an error that 2 objects were received. That means that the queries are getting the rows from the database. </p>
  
  <p><strong>models.py</strong></p>
  
  <pre><code>from django.db import models
  
  class UserProfile(models.Model):
      name = models.CharField(max_length=50,verbose_name="Name")
      login = models.CharField(max_length=(25),verbose_name="Login")
      password = models.CharField(max_length=100, verbose_name="Password")
      phone = models.CharField(max_length=20, verbose_name="Phone number", null=True, default=None, blank=True)
      born_date = models.DateField(verbose_name="Born date" , null=True,default=None, blank=True)
      last_connection = models.DateTimeField(verbose_name="Date of last connection" , null=True, default=None, blank=True)
      email = models.EmailField(verbose_name="Email")
      years_seniority = models.IntegerField(verbose_name="Seniority", default=0)
      date_created = models.DateField(verbose_name="Date of Birthday", auto_now_add=True)
  
      def __str__(self):
          return self.name
  
  
  class Supervisor(UserProfile):
      specialisation = models.CharField(max_length=50, verbose_name="Specialisation")
  
  class Developer(UserProfile):
      supervisor = models.ForeignKey(Supervisor, verbose_name="Supervisor")
  </code></pre>
  
  <p>The form view <strong>create_developer.py</strong> -</p>
  
  <pre><code>from django.shortcuts import render
  from django.http import HttpResponse
  from TasksManager.models import Supervisor, Developer
  # View for create_developer
  def page(request):
      error = False
      # If form has posted
      if request.POST:
          if 'name' in request.POST:
              name = request.POST.get('name', '')
          else:
              error=True
          if 'login' in request.POST:
              login = request.POST.get('login', '')
          else:
              error=True
          if 'password' in request.POST:
              password = request.POST.get('password', '')
          else:
              error=True
          if 'supervisor' in request.POST:
              supervisor_id = request.POST.get('supervisor', '')
          else:
              error=True
          if not error:
              supervisor = Supervisor.objects.get(id = supervisor_id)
              new_dev = Developer(name=name, login=login, password=password,supervisor=supervisor)
              new_dev.save()
              return HttpResponse("Developer added")
          else:
              return HttpResponse("An error as occured")
      else:
          supervisors_list =  Supervisor.objects.all()
          return render(request, 'en/public/create_developer.html')
  </code></pre>
  
  <p>template <strong>create_developer.html</strong></p>
  
  <pre><code>{% extends "base.html" %}
      {% block title_html %}
          Create Developer
      {% endblock %}
      {% block h1 %}
          Create Developer
      {% endblock %}
      {% block article_content %}
          &lt;form method="post" action="{% url 'create_developer' %}" &gt;
  
  
          &lt;table&gt;
              &lt;tr&gt;
                  &lt;td&gt;Name&lt;/td&gt;
                  &lt;td&gt;
                      &lt;input type="text" name="name" /&gt;
                  &lt;/td&gt;
              &lt;/tr&gt;
  
              &lt;tr&gt;
                  &lt;td&gt;Login&lt;/td&gt;
                  &lt;td&gt;
                      &lt;input type="text" name="login" /&gt;
                  &lt;/td&gt;
              &lt;/tr&gt;
  
              &lt;tr&gt;
                  &lt;td&gt;Password&lt;/td&gt;
                  &lt;td&gt;
                  &lt;input type="text" name="password" /&gt;
                  &lt;/td&gt;
              &lt;/tr&gt;
  
              &lt;tr&gt;
              &lt;td&gt;Supervisor&lt;/td&gt;
              &lt;td&gt;
                  &lt;select name="supervisor"&gt;  
                      {% for supervisor in supervisors_list %}
                          &lt;option value="{{ supervisor.id }}"&gt;{{ supervisor.name}}&lt;/option&gt;
                      {% endfor %}
                  &lt;/select&gt;
              &lt;/td&gt;
              &lt;/tr&gt;
  
              &lt;tr&gt;
                  &lt;td&gt;&lt;/td&gt;
                  &lt;td&gt;
                      &lt;input type="submit" value="Valid" /&gt;
                  &lt;/td&gt;
              &lt;/tr&gt;
  
          &lt;/table&gt;
      &lt;/form&gt;
  {% endblock %}
  </code></pre>
  
  <p>The <strong>supervisor</strong> select list should show the list. But I am getting an empty list there. The output of <strong><em>{{ supervisors_list|length }}</em></strong> is zero.</p>
  
  <p>How to debug this?
  <img src="https://i.stack.imgur.com/rNK9C.png" alt="enter image description here"></p>