Advertisement



< Prev
Next >



Django Template Dot Lookups



In our last tutorial, we have explained how the Django Template System is used. In this tutorial, we are going to explain a situation when the Django template system encounters a dot in a variable name(in an HTML template file), within an executing template. In such situation, django template System uses the dot lookups strategy.




Dot Lookups Strategy


When the Django Template System encounters a dot in a variable name(at the execution of an HTML template), it uses the dot lookups strategy, which tries to find a specific match for the variable from a list of values shown below(in the following order): The first matched lookup type is executed by the Django Template System.




How to implement the dot lookups strategy with dot operator







Up Next-


In the next few tutorials, we are going to discuss all these lookups strategies used by the Django Template System with examples. So, please turn to the next tutorial to learn about the first dot lookup strategy used by Django Template System - Dictionary lookup.



Please share this article -




< Prev
Next >
< Django Template System
Template with Dictionary lookup >



Advertisement

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

C#, PYTHON and DJANGO


Advertisement