i think you can create a form for this and integrate in your template. 
through which u can search in your database . and for more details check 
https://docs.djangoproject.com/en/2.0/topics/forms/

On Tuesday, January 23, 2018 at 5:04:48 PM UTC+5:30, Carl Brubaker wrote:
>
> I am trying to make a search field in a template and connect it back to my 
> database so I can "find" stuff.
>
> I found this in the django docs:
>
> >>> Author.objects.filter(name__unaccent__icontains='Helen')[<Author: Helen 
> >>> Mirren>, <Author: Helena Bonham Carter>, <Author: Hélène Joy>]
>
> which is helpful, but I'm having trouble connecting to my template:
>
> <input type="search" />
>
> I'm not sure what to call my variable or how to integrate it into models. All 
> of the existing stuff I can find is django 1.
>
> Thanks!
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/3bc83af1-23e0-4f08-900a-485f37aec8d6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to