title: AttributeError at /add/...Getting 'str' object has no attribute 'get' in Django.Atrri
body: <p><strong>models.py</strong>
  I write this code for creating a form which has two fileds named Title and Desc
  from django.db import models.Here is models.py code.</p>
  <pre><code>class Post(models.Model):
      title = models.CharField(max_length=200)
      desc = models.TextField()
  </code></pre>
  <p>And Here is forms.py Code
  <strong>forms.py</strong></p>
  <pre><code>from django import forms
  from django.contrib.auth.forms import UserCreationForm,AuthenticationForm,UsernameField
  from django.contrib.auth.models import User
  from .models import Post
  
  class PostForm(forms.ModelForm):
      class Meta:
          model = Post
          fields = ['title','desc']
          # label = {'title':'Title','desc':'Description'}
          widgets={'title':forms.TextInput(attrs={'class':'form-control'}),
          'desc':forms.Textarea(attrs={'class':'form-control'})}
  </code></pre>
  <p>Here is the views.py code
  <strong>views.py</strong></p>
  <pre><code>from django.shortcuts import render,HttpResponseRedirect
  from .forms import SignUpForm,LoginForm,PostForm
  from django.contrib import messages
  from django.contrib.auth import authenticate,login,logout
  from .models import Post
  
  def add_post(request):
      if request.user.is_authenticated:
          if request.method == &quot;POST&quot;:
              form = PostForm(request.method)
              if form.is_valid():
                  title1 = form.cleaned_data['title']
                  description = form.cleaned_data['desc']
                  pst = Post(title=title1,desc=description)
                  pst.save()
                  form = PostForm()
          else:
              form = PostForm()
          return render(request,'blog_app/addpost.html',{'form':form})
      else:
          return HttpResponseRedirect('/login/')
  </code></pre>
  <p>Here is the addpost.html
  <strong>addpost.html</strong></p>
  <pre><code>{% extends 'blog_app/base.html' %}
  {% load static %}
  {% block content %}
      &lt;div class=&quot;col-sm-10&quot;&gt;
          &lt;h3 class=&quot;text-black my-5 alert alert-success&quot;&gt;Add Post&lt;/h3&gt;
          &lt;form action=&quot;&quot; method=&quot;post&quot;&gt;
      {% csrf_token %}
          {{form.as_p}}
          &lt;input type=&quot;submit&quot; value=&quot;Add&quot; class=&quot;btn btn-primary&quot;&gt;
          &lt;a href='{% url &quot;dashboard&quot;%}' class=&quot;btn btn-danger&quot;&gt;Cancel&lt;/a&gt;
      &lt;/form&gt; 
      &lt;/div&gt;
  {% endblock content %}
  </code></pre>
  <p>But When I click on Add Button I got this error<a href="https://i.stack.imgur.com/gmR7j.png" rel="nofollow noreferrer">enter image description here</a></p>
  <p>What is the solution of it
  Here is Url.py code
  <strong>urls.py</strong></p>
  <pre><code>from django.contrib import admin
  from django.urls import path
  from blog_app import views
  
  urlpatterns = [
      path('admin/', admin.site.urls),
      path('', views.home),
      path('about/', views.about,name='about'),
      path('contact/', views.contact,name='contact'),
      path('dashboard/', views.dashboard,name='dashboard'),
      path('signup/', views.signup,name='signup'),
      path('login/', views.user_login,name='login'),
      path('logout/', views.user_logout,name='logout'),
      path('add/', views.add_post,name='addpost'),
      path('update/&lt;int:id&gt;/', views.update_post,name='updatepost'),
      path('delete/&lt;int:id&gt;/', views.delete_post,name='deletepost'),
  ]
  </code></pre>
  <p>And This is the error Shows in my terminal
  <a href="https://i.stack.imgur.com/wB5OE.png" rel="nofollow noreferrer">terminal img</a></p>