title: how to call a field of a django model from the id?
body: <p>I cant find the error in this code 
  the code call a model id from select and store it in a variable , after i need to recupere two champs of models and store like a char in array</p>
  
  <pre><code>&lt;script&gt;
      $(document).ready(function() {
          $("#resoudre").click(function(){
              var strVehicules = $('#vehicule_sel')[0].value.innerText;
              var vehicules = strVehicules.split(" ");
              var idDemandes = $('#pt_collecte')[0].value;
              p = PointCollecte.objects.get(id=idDemandes);
              var strDemandes = (p.Latitude,p.Longitude);
              var demandes = strDemandes.split(" ");
           });
      });
  &lt;/script&gt;
  </code></pre>
  
  <p>fichier models.py</p>
  
  <pre><code>class vehicule(models.Model):
  Matricule = models.CharField(max_length=50)
  Marque = models.CharField(max_length=50)
  Type = models.CharField(max_length=50)
  Capacite = models.CharField(max_length=50)
  date_mise_en_circulation = models.DateField(null=True)
  
  def __str__(self):
      return self.Matricule
  
  class PointCollecte(models.Model):
  Nom = models.CharField(max_length=50)
  Latitude = models.CharField(max_length=50)
  Longitude = models.CharField(max_length=50)
  Qtmoyenne = models.FloatField()
  </code></pre>
  
  <p>template .html</p>
  
  <pre><code>&lt;form&gt;
          &lt;div class="form-row"&gt;
              &lt;div class="form-group col-md-6"&gt;
                  &lt;label for="pt_collecte"&gt;Les points De Collecte a visités &lt;/label&gt;
                  &lt;select multiple class="form-control" id="pt_collecte"&gt;
                      {% for PointDeCollecte in pt_collectes%}
                          &lt;option value="{{PointDeCollecte.id}}"&gt;{{ PointDeCollecte.Nom }} &lt;/option&gt;
                      {% endfor %}
                  &lt;/select&gt;
              &lt;/div&gt;
              &lt;div class="form-group col-md-6"&gt;
                  &lt;label for="vehicule_sel"&gt;Les véhicules a utilisés &lt;/label&gt;
                  &lt;select multiple class="form-control" id="vehicule_sel"&gt;
                      {% for vehicule in vehicules %}
                      &lt;option value="vehicule.id"&gt;{{ vehicule.Matricule }}&lt;/option&gt;
                      {% endfor %}
                  &lt;/select&gt;
              &lt;/div&gt;
          &lt;/div&gt;
          &lt;div class="form-group col-md-4"&gt;
              &lt;button id="resoudre" class="btn btn-primary my-1"&gt;valider &lt;/button&gt;
          &lt;/div&gt;
      &lt;/form&gt;
  </code></pre>