I’m agree with you that you should use filter(). Or you can use
objectname.DoesNotExist as an exception.

On Thu, Sep 13, 2018 at 7:07 AM Manuel Alejandro Garrido Gongora <
[email protected]> wrote:

> It is likely because you are getting a directly on an object that probably
> does not exist in the database, I recommend that you use it instead of get
> filter (). first () or the method get_object_or_404 from django Regards
>
> Enviado desde mi iPhone
>
> El 12 sept 2018, a las 19:43, Gear Crew <[email protected]>
> escribió:
>
> what's the problem I sure no any error in code
>
> <Screenshot from 2018-09-12 19-41-23.png>
>
> <Screenshot from 2018-09-12 19-41-32.png>
>
> --
> 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 [email protected].
> To post to this group, send email to [email protected].
> 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/0de12f97-7541-4aba-a280-adae62dd7c5a%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/0de12f97-7541-4aba-a280-adae62dd7c5a%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>
> <Screenshot from 2018-09-12 19-41-23.png>
>
> <Screenshot from 2018-09-12 19-41-32.png>
>
> --
> 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 [email protected].
> To post to this group, send email to [email protected].
> 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/E1370835-D55F-40B0-864B-D09CDE5A6CE3%40gmail.com
> <https://groups.google.com/d/msgid/django-users/E1370835-D55F-40B0-864B-D09CDE5A6CE3%40gmail.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 [email protected].
To post to this group, send email to [email protected].
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/CAFBVQh_jSZGAFCV4UuEAj5M0wQ5kSQA_78r0VzvK67P6PSvt%2Bg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to