How to verify if is new record or update record on django template?

19 views
Skip to first unread message

Fellipe Henrique

unread,
Jul 12, 2018, 9:58:45 AM7/12/18
to Django Users
How to verify if is new record or update record on django template? How can i do that?

Thanks!

Jani Tiainen

unread,
Jul 12, 2018, 10:32:14 AM7/12/18
to django...@googlegroups.com
Hi.

Usually you know that in a view. Url routing will be different depending if it's a new record or editing old record.

to 12. heinäk. 2018 klo 16.58 Fellipe Henrique <fell...@gmail.com> kirjoitti:
How to verify if is new record or update record on django template? How can i do that?

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...@googlegroups.com.
To post to this group, send email to django...@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/CAF1jwZH40f%3D3ATxVSNx8Ku%3DWiG1MxnN%3D89MLw-5%2B-iNuEu9uQA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Derek

unread,
Jul 13, 2018, 4:00:55 PM7/13/18
to Django users
You can pass in the ID (primary key) of the object from the view to the template.
Reply all
Reply to author
Forward
0 new messages