Cr is string not a model that's why this error is coming...
change the name of cr variable in which you are taking the request data

On Sat, 28 Dec 2019, 4:41 pm gaurav jain, <crazcu...@gmail.com> wrote:

> Show the backend code of the post request
> Regards
> Gaurav Jain
>
> On Sat, 28 Dec, 2019, 4:31 pm Chetan Rokade, <rokade.cheta...@gmail.com>
> wrote:
>
>> Hi Friends,
>> Getting below error while doing search operation :
>> 'str' object has no attribute 'objects'
>>
>> Code:
>> 1) html having search button :
>> <form method="POST" action="SearchCR">
>>         {% csrf_token %}
>>         <div class="form-group">
>>             <div class="col-lg-5">
>>                 <input type="text" name="CR_NAME" class="form-control"
>> placeholder="Enter Application">
>>             </div>
>>             <label class="col-lg-2">
>>                 <button type="submit" class="btn btn-primary"> Search </
>> button>
>>             </label>
>>         </div>
>>     </form>
>>
>>
>> --
>> 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 view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/80817360-1f88-4980-a628-89f6ee24b1d3%40googlegroups.com
>> <https://groups.google.com/d/msgid/django-users/80817360-1f88-4980-a628-89f6ee24b1d3%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAMiDnWC6ybt%2B3HdDd5n6Qqi2ATunCGUYsXWRbmtU3oZNPd%3DZwQ%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CAMiDnWC6ybt%2B3HdDd5n6Qqi2ATunCGUYsXWRbmtU3oZNPd%3DZwQ%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAPjsHcFOuaeOB2oZGB1jgAv3_6ROrmPgpMVEqX%2BaouUE3F8Lsw%40mail.gmail.com.

Reply via email to