title: Django Form Primary Key on save() method - getting NoneType traceback
body: <p>I was using the q&amp;a at 
  <a href="https://stackoverflow.com/questions/732952/get-primary-key-after-saving-a-modelform-in-django#new-answer">Get Primary Key after Saving a ModelForm in Django</a>.</p>
  
  <p>It's exactly on point with what I need to do.</p>
  
  <p>I have the following model:</p>
  
  <pre><code>class meetingEvent(models.Model):
      '''
      A meeting event
      '''
  
      name = models.CharField(max_length=64, help_text="a name for this meeting")
      account_number = models.ForeignKey(account)
      meeting_type = models.ForeignKey(meetingType)
      meeting_group = models.ForeignKey(meetingGroup)
      start_time = models.DateTimeField(help_text="start time for this event")
      end_time = models.DateTimeField(help_text="end time for this event")
      created_time = models.DateTimeField(auto_now_add=True)
      listed_products = models.ForeignKey(product)
      additonal_notes = models.TextField(help_text="additional notes for this meeting")
  
      def __unicode__(self):
          return self.name
  </code></pre>
  
  <p>I have the following form:</p>
  
  <pre><code>class meetingEventForm(forms.ModelForm):
      """
      to create a new meeting event.
      """
      portal_user = forms.CharField(help_text="username to access portal data")
      portal_pass = forms.CharField(widget=forms.PasswordInput, help_text="password to add access portal data")
  
      def save(self, commit=True):
  
          super(meetingEventForm, self).save(commit=commit)
  
      class Meta:
          model = meetingEvent
  </code></pre>
  
  <p>I have the following view:</p>
  
  <pre><code>def meeting_event(request):
  
      if request.method == 'POST':
          form = meetingEventForm(request.POST)
          if form.is_valid():
              new_agenda=form.save()
  
              return HttpResponseRedirect(reverse('agenda_detail', args=(new_agenda.pk,)))
  
      else:
          form = meetingEventForm()
          return render_to_response('agendas/event.html',{'form':form,}, context_instance=RequestContext(request))
  </code></pre>
  
  <p>I've confirmed that this makes it into the database cleanly.
  However, I get the following error:</p>
  
  <pre><code>Traceback:
  File "/usr/lib/python2.6/site-packages/Django-1.5.2-py2.6.egg/django/core/handlers/base.py" in get_response
    115.                         response = callback(request, *callback_args, **callback_kwargs)
  File "/usr/lib/python2.6/site-packages/Django-1.5.2-py2.6.egg/django/contrib/auth/decorators.py" in _wrapped_view
    25.                 return view_func(request, *args, **kwargs)
  File "/var/www/html/tamtools/agendas/views.py" in meeting_event
    44.             return HttpResponseRedirect(reverse('agenda_detail', args=(new_agenda.pk,)))
  
  Exception Type: AttributeError at /agendas/add/
  Exception Value: 'NoneType' object has no attribute 'pk'
  </code></pre>
  
  <p>Has something changed in Django 1.5 that I don't know about? new_agenda should be a meetingEventForm type, shouldn't it?</p>