Advertisement



< Prev
Next >



Django Template with Attribute Lookup



In this tutorial we are going to explain a situation when the Django Template System uses the dot lookups strategy on encountering a dot operator with a variable name in an executing HTML template, finds a match with an attribute i.e. variable that belong to the class.




How to implement attribute lookup strategy with dot operator


The attribute lookup is implemented using the dot operator with a variables name in the HTML template file, for example - d.date, d.month. d.year, where -
Let us create a Django project to explain you this situation. For those who don't know how to create a Django Project from a scratch and have not read our last tutorial, here is a recap.



Please Subscribe

Please subscribe to our social media channels for daily updates.


Decodejava Facebook Page  DecodeJava Twitter Page Decodejava Google+ Page




Advertisement

Notifications



Please check our latest addition

PYTHON and DJANGO


Advertisement