How to deal 'WSGIRequest' object has no attribute 'Get'

I am a django beginner even programming beginner this issue I have found one day still can not work out

views.py

from django.shortcuts import render, redirect
from django.template import loader
from .models import Topic
from django.contrib.auth.models import User
from .forms import TopicForm
# Create your views here.
def home(request):
    
    q = request.Get.get('q')
    topics = Topic.objects.filter(name__icontains=q)
    context = {'topics':topics}
    template = loader.get_template('home.html')
    return render(request, 'home.html', context)

models.py

from django.db import models
from django.contrib.auth.models import User
# Create your models here.
class Topic(models.Model):
    name = models.CharField(max_length=200)
    description = models.TextField()

home.html

<body>
    {% include 'navbar.html' %}
    <div>
        <div>
            <h3>Topic</h3>
            {% for topic in topics %}
                
                <a href="{% url 'home' %}?q={{topic.name}}">{{topic.name}}</a>

            {% endfor %}
        </div>
    </div>
</body>

I tried if statment still not work

Back to Top