title: AttributeError: 'tuple' object has no attribute 'get' in Django
body: <p>I want to add a multiple choice field to my project app. This field should allow the user for select more than one choice. But I get an error. Before I added the multiple choice field, this part did not give any error. Where is my mistake?</p>
  
  <p><strong>my views.py</strong></p>
  
  <pre><code>def project_new(request):
  if request.method == 'POST':
      form = ProjectForm(request.POST)
      if form.is_valid():
          project = Project()
         ...
          project.lang_choices = form.cleaned_data['select_lang']
          project.save()
          return redirect('projects')
  else:
      form = ProjectForm()
  
  
    return render(request, 'blog/project_new.html', {'form': form})
  
  @login_required(login_url='/login/')
  def project_details(request, pk):
      project = get_object_or_404(Project, pk=pk)
      return render(request, 'blog/project_detail.html', {'project': project})
  </code></pre>
  
  <p><strong>my models.py</strong></p>
  
  <pre><code>class ProgrammingLanguage(models.Model):
  name = models.CharField(max_length=100)
  
  def __str__(self):
      return self.name
  class Project(models.Model):
          ...
          select_langs = models.ManyToManyField(ProgrammingLanguage)
          ...
          slug = models.UUIDField(default=uuid.uuid4)
      ...
  </code></pre>
  
  <p><strong>forms.py</strong></p>
  
  <pre><code>class ProjectForm(forms.Form):
  ...
  select_lang = forms.ChoiceField(
      label='diller: ',
      widget=forms.CheckboxSelectMultiple()
  )
  
  def __init__(self, *args, **kwargs):
      super(ProjectForm, self).__init__(args, kwargs)
  
  
  
         self.fields['select_lang'].choices = [(l.id, l.name) for l in ProgrammingLanguage.objects.all()]
  
  
  class Meta:
      model = Project
      fields = (
          'first_name', 'last_name', 'email', 'project_name', 'project_description', 'project_notes', 'select_langs')
  </code></pre>
  
  <p><strong>And this is my traceback</strong></p>
  
  <pre><code>Internal Server Error: /project/new/
  Traceback (most recent call last):
    File "/home/eda/.local/lib/python2.7/site-packages/django/core/handlers/exception.py", line 41, in inner
      response = get_response(request)
    File "/home/eda/.local/lib/python2.7/site-packages/django/core/handlers/base.py", line 187, in _get_response
      response = self.process_exception_by_middleware(e, request)
    File "/home/eda/.local/lib/python2.7/site-packages/django/core/handlers/base.py", line 185, in _get_response
      response = wrapped_callback(request, *callback_args, **callback_kwargs)
    File "/home/eda/.local/lib/python2.7/site-packages/django/contrib/auth/decorators.py", line 23, in _wrapped_view
      return view_func(request, *args, **kwargs)
    File "/home/eda/staj_defteri/project/views.py", line 16, in project_new
      if form.is_valid():
    File "/home/eda/.local/lib/python2.7/site-packages/django/forms/forms.py", line 183, in is_valid
      return self.is_bound and not self.errors
    File "/home/eda/.local/lib/python2.7/site-packages/django/forms/forms.py", line 175, in errors
      self.full_clean()
    File "/home/eda/.local/lib/python2.7/site-packages/django/forms/forms.py", line 384, in full_clean
      self._clean_fields()
    File "/home/eda/.local/lib/python2.7/site-packages/django/forms/forms.py", line 396, in _clean_fields
      value = field.widget.value_from_datadict(self.data, self.files, self.add_prefix(name))
    File "/home/eda/.local/lib/python2.7/site-packages/django/forms/widgets.py", line 240, in value_from_datadict
      return data.get(name)
  AttributeError: 'tuple' object has no attribute 'get'
  [17/Sep/2018 08:19:35] "POST /project/new/ HTTP/1.1" 500 98194
  </code></pre>