On Fri, 2009-01-23 at 16:26 -0800, Brian Neal wrote:
> I have an object that I display on multiple pages. Initially I created
> a little template .html file for it, and I simply
> 
> {% include 'my_object.hml' %}
> 
> every where I need it.
> 
> I have since discovered inclusion tags. Would it be better, worse, or
> just different to do this instead?
> 
> {% load my_tags %}
> ..
> ..
> {% display_my_object obj %}

If the first version works, isn't it simpler to understand (modulo
knowing where my_object.html comes from)?

I wouldn't spend any time at all worrying about this. Whichever feels
nicest for you is the right answer. I'd go with the second solution for
most cases, just to avoid having to create temporary files all over the
place, but it depends on how often and how many and whether you also
need to worry about caching. 

Regards,
Malcolm


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to