# Django form not rendering in html

**URL:** <https://forum.djangoproject.com/t/django-form-not-rendering-in-html/4145>\
**Category:** Using Django\
**Created:** [September 1, 2020, 7:01pm UTC](https://forum.djangoproject.com/t/django-form-not-rendering-in-html/4145 "2020-09-01T19:01:57Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![iFunction](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/ifunction/32/1941_2.png) [@iFunction](https://forum.djangoproject.com/u/iFunction)\
**Post date:** [September 1, 2020, 7:01pm UTC](https://forum.djangoproject.com/t/django-form-not-rendering-in-html/4145/1 "2020-09-01T19:01:57Z")

</div>

Hi, No idea what’s going on here, I’ve never seen this before, but I’m using django-filters but the actual search bar is not showing up, I thought that was part of the filters package and got rendered as part of using it, but all that shows is the submit button. What am I doing wrong?

filter.py

```
from django.contrib.auth.models import User
import django_filters
from .models import Project

class ProjectFilter(django_filters.FilterSet):

    class Meta:
        model = Project
        fields = ['user', 'title']

```

views.py:

```
def search_view(request):
    project_list = Project.objects.all()
    project_filter = ProjectFilter(request.GET, queryset=(project_list)
    return render(request, 'project_portal/filter.html', {'filter': project_filter})

```

urls.py:

```
 path('search/', search_view, name='search'),

```

html:

```
<!DOCTYPE html>
<div>
  <form method="get">
    {{ filter.form.as_p }}
    <input type="submit"/>
  </form>
  {% for user in filter.qs %}
  {{ user.title }}
  {% endfor %}
</div>
```

---

<div class="post-metadata">

**Author:** ![Suttonium](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/suttonium/32/1264_2.png) [@Suttonium](https://forum.djangoproject.com/u/Suttonium)\
**Post date:** [September 1, 2020, 8:32pm UTC](https://forum.djangoproject.com/t/django-form-not-rendering-in-html/4145/2 "2020-09-01T20:32:52Z")

</div>

> [@iFunction](#):
>
> `project_filter = ProjectFilter(request.GET, queryset=(project_list)`

Is this the current syntax you’re using or a copy/paste error?

---

<div class="post-metadata">

**Author:** ![iFunction](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/ifunction/32/1941_2.png) [@iFunction](https://forum.djangoproject.com/u/iFunction)\
**Post date:** [September 1, 2020, 9:57pm UTC](https://forum.djangoproject.com/t/django-form-not-rendering-in-html/4145/3 "2020-09-01T21:57:31Z")

</div>

Ah, typo, sorry, that line should be:

```
project_filter = ProjectFilter(request.GET, queryset=project_list)
```
