title: Django adds square brackets and quotes to charfield input
body: <p>recently I encountered a rather weird problem with my Django forms. I am currently working on my todo list project. Everything works fine, except that whenever I add a new task, its title seems to be saved in database with additional square brackets and quotes around it. It looks like one-element list, but it is a string. I kinda solved it by displaying the silced version of the string from the database, but it still shows for example while editing a task. Hope anyone has some idea what might be going on?</p>
  
  <p>models.py:</p>
  
  <pre><code>from django.db import models
  
  class Task(models.Model):
      title = models.CharField(max_length=35)
      completed = models.BooleanField(default=False)
      created_date = models.DateTimeField(auto_now_add=True)
      # added_by = models.ForeignKey(settings.AUTH_USER_MODEL, on_delete=models.CASCADE)
      author = models.CharField(max_length=50, default='')
  
      def __str__(self):
          return self.title
  </code></pre>
  
  <p>forms.py:</p>
  
  <pre><code>from django import forms
  from .models import *
  
  
  class TaskForm(forms.ModelForm):
      class Meta:
          model = Task
          fields = '__all__'
          widgets = {
              'title': forms.TextInput(attrs={'class': 'new_task_text', 'placeholder': 'Add new task'}),
          }
  
  
  class TaskEditForm(forms.ModelForm):
      class Meta:
          model = Task
          fields = ['title', 'completed']
          widgets = {
              'title': forms.TextInput(attrs={'class': 'new_task_text'}),
          }
  </code></pre>
  
  <p>views.py:</p>
  
  <pre><code>from django.shortcuts import render, redirect
  from .forms import *
  from django.contrib.auth.decorators import login_required
  
  
  @login_required
  def list_homepage(request):
      tasks = Task.objects.filter(author=request.user.username)
  
      for task in tasks:
          if "['" and "']" in task.title:
              task.title = task.title[2:-2]       # CharField returns a string that is looking like one-element list. Have no idea why yet.
                                                  # try using form instead of modelform.
      form = TaskForm()
      if request.method == 'POST':
          form = TaskForm({**request.POST, **{'author': request.user.username}})
          if form.is_valid():
              form.save()
          else:
              print(form.errors)
          return redirect('/list/home')
  
      context = {
          'page_title': 'Todo list',
          'tasks': tasks,
          'form': form,
      }
      return render(request, 'tasks/list.html', context)
  
  
  @login_required
  def update_task(request, pk):
      task = Task.objects.get(id=pk)
      form = TaskEditForm(instance=task)
  
      if request.method == 'POST':
          form = TaskEditForm(request.POST, instance=task)
          if form.is_valid():
              form.save()
              return redirect('../..')
      context = {
          'form': form,
          'page_title': 'Update task',
      }
      return render(request, 'tasks/update_task.html', context)
  
  
  @login_required
  def delete_task(request, pk):
      task = Task.objects.get(id=pk)
  
      if request.method == 'POST':
          task.delete()
          return redirect('/list')
  
      context = {
          'page_title': 'Delete task',
          'task': task,
      }
  
      return render(request, 'tasks/delete_task.html', context)
  </code></pre>
  
  <p>list.html:</p>
  
  <pre><code>{% extends 'tasks/base.html' %} 
  
  
  {% block content %}
  &lt;div class="new-task-column"&gt;
      &lt;form method="POST", action="#"&gt; {% csrf_token %}
          {{ form.title }}
          &lt;input class="submit" type="submit", value="Create task"&gt;
      &lt;/form&gt;
  &lt;/div&gt;
  
  &lt;div class="task-column"&gt;
  {% for task in tasks %}
          &lt;div class="item-row"&gt;
  
              &lt;div class="task"&gt; 
                      {% if task.completed == True %}
                          &lt;s&gt;{{ task }} &lt;/s&gt;
                      {% else %}
                          {{ task }}
                      {% endif %}
  
              &lt;/div&gt;
  
              &lt;div class="del_upd_container"&gt;
                  &lt;div class="single-upd-container"&gt;&lt;a class="edit_button" href="/list/update_task/{{ task.id }}"&gt;Update&lt;/a&gt;&lt;/div&gt;
                  &lt;div class="single-del-container"&gt;&lt;a class="edit_button" href="/list/delete_task/{{ task.id }}"&gt;Delete&lt;/a&gt;&lt;/div&gt;
              &lt;/div&gt;
          &lt;/div&gt;
  {% endfor %}
  &lt;/div&gt;
  {% endblock content %}
  </code></pre>
  
  <p>update_task.html:</p>
  
  <pre><code>{% extends 'tasks/base.html' %} 
  
  {% block content %}
  &lt;div class="new-task-column"&gt;
    &lt;form method="POST"&gt; {% csrf_token %}
      &lt;span class="update-task-layout"&gt;
        {{ form }}
        &lt;input class="submit" type="submit" name="Update item"&gt;
      &lt;/span&gt;
    &lt;/form&gt;
  &lt;/div&gt;
  {% endblock content %}
  </code></pre>
  
  <p>Thank you so much for any help, I really appreciate it!</p>