I want to access the latest object a django-mptt tree.
Is it possible to do this from a django template?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
In python code, you can use the get_children method. This should work:
To use this in a template, you’d need to write a simple template tag:
Have a look at the Django documentation to find out how to integrate this tag into your project.