title: Get the id of an object after processing its form in views.py
body: <p>I need to get the id of the object I just kept in order to pass it in the HttpResponseRedirect:</p>
  
  <pre><code>def pujar_track(request):
  if request.method=='POST':
      formulari = TrackForm(request.POST, request.FILES)
      if formulari.is_valid():                    
          formulari.save()            
          # code to get the track_id ???          
          return HttpResponseRedirect('/track/pujar/acoplar',track_id)
  else:
      formulari = TrackForm()
  
  return render(request,'principal/trackForm.html',
      {'formulari':formulari})
  </code></pre>
  
  <p>Thanks in advance!</p>