Thank you James,

I'm in the process of breaking this down in the view. Should have
thought about that earlier.

Thanks again!

R

On Sep 16, 6:22 pm, James Punteney <punte...@gmail.com> wrote:
> Hi Ricardo,
>
> On Wed, Sep 16, 2009 at 12:18 PM, rvidal <rvi...@gmail.com> wrote:
> > I can see that I'm using too much logic in my template but was hoping
> > it would be possible without having to go into making custom tags.
>
> If there is too much logic in the template in general there are two options.
> 1. Create a templatetag with the logic
> 2. Do the logic within the view so you can do a simple loop in the template
>
> If you are wanting to use the output in many different templates/views then
> your best bet is to use a templatetag as that is easier to include multiple
> places. If you only need the logic for one template/view then I'd recommend
> processing the data in the view function to turn it into simple list or
> similar object that you can easily loop through in the template without all
> the additional logic.
>
> --James
--~--~---------~--~----~------------~-------~--~----~
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