Re: include template which extends something else

2015-10-28 Thread Sven Wanner
Oh man sorry, there was something wrong with finding the template but many thanks for your advices. It helped me a lot even if the problem was blindness. But anyway, I am happy now. Best regards to you 2015-10-28 17:25 GMT+01:00 Sven Wanner : > Yes, sorry I was confused... No I don't get what yo

Re: include template which extends something else

2015-10-28 Thread Carl Meyer
On 10/28/2015 10:25 AM, Sven Wanner wrote: > Yes, sorry I was confused... No I don't get what you mean. I think thats > exactly what I tried to do. > > I have kind of a main.html doing that: > > {% block my-wall %} > > > {% for obj in objects %} > > {% include 'wall_item.h

Re: include template which extends something else

2015-10-28 Thread Sven Wanner
Yes, sorry I was confused... No I don't get what you mean. I think thats exactly what I tried to do. I have kind of a main.html doing that: {% block my-wall %} {% for obj in objects %} {% include 'wall_item.html' with object=obj %}

Re: include template which extends something else

2015-10-28 Thread Carl Meyer
On 10/28/2015 10:11 AM, Sven Wanner wrote: > Ok, it's a pitty, but you're totally right. Using if in my template > should be also fine. Not of that elegance I planned ;) , but will > definitely work, too. I'm not sure what you mean. I thought I just explained how you can use `extends` in an inclu

Re: include template which extends something else

2015-10-28 Thread Sven Wanner
Ok, it's a pitty, but you're totally right. Using if in my template should be also fine. Not of that elegance I planned ;) , but will definitely work, too. Thank you 2015-10-28 17:04 GMT+01:00 Carl Meyer : > Hi Sven, > > On 10/28/2015 09:50 AM, Sven Wanner wrote: > > Thanks for your quick reply

Re: include template which extends something else

2015-10-28 Thread Carl Meyer
Hi Sven, On 10/28/2015 09:50 AM, Sven Wanner wrote: > Thanks for your quick reply. Yes, this is also what I found, so I was > quite shure that my code will never work. What I try to do is to render > a list of database objects. But not only on one page but on different > pages and with slightly di

Re: include template which extends something else

2015-10-28 Thread Tim Graham
I don't think you can structure your templates that way. Maybe using {% if %} tags in your included template would be enough (instead of using {% extends %}). On Wednesday, October 28, 2015 at 11:51:12 AM UTC-4, svewa wrote: > > Thanks for your quick reply. Yes, this is also what I found, so I w

Re: include template which extends something else

2015-10-28 Thread Sven Wanner
Thanks for your quick reply. Yes, this is also what I found, so I was quite shure that my code will never work. What I try to do is to render a list of database objects. But not only on one page but on different pages and with slightly different designs in each of the lists. So my plan was, to avoi

Re: include template which extends something else

2015-10-28 Thread Tim Graham
I think that's a limitation described in the {% include %} docs: https://docs.djangoproject.com/en/1.8/ref/templates/builtins/#include. See the "Note" box where it says: The include tag should be considere

include template which extends something else

2015-10-28 Thread svewa
Hi all, sorry if it might be a stupid question for pro's but it seems I still miss a deeper knowledge of some design aspects. What I try to do is the following: {% for obj in objects %} {% include 'item.html' with object=obj %} {% endfor %} this I need to to in