Obfuscate HTML..?

2009-05-24 Thread jago
Hi, I want to make the HTML of the website as little human readable as possible. For that I would like to add some layer to Django 0.96 which when writing out the page takes the HTML and adds some processing. 1. How would I obfuscate the HTML as much as possible (remove all line breaks, etc.) 2.

Check if value in List inside template..?

2009-05-24 Thread jago
Hi, I use Django 0.96 and wonder if one can check if a value is in a list; {% if value in mylist %} ... {% endif %} --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send

Add rel="nofollow" to all outbound links?

2009-05-24 Thread jago
Hi, can I tell Django 0.96 to automatically process all outbound links and add: rel="nofollow" ? Thanks, jago --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to th

How to apply filter to included template?

2009-03-10 Thread jago
Can I somehow apply an filter to an included template? {% include "header_viz_js.html" %} how? --~--~-~--~~~---~--~~ 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@

Re: Encode Html for correct display in tags?

2009-03-10 Thread jago
Ok...the text in the docu also describes it for 0.96. Thanks! --~--~-~--~~~---~--~~ 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 fro

Re: Encode Html for correct display in tags?

2009-03-10 Thread jago
I am restricted to Django 0.96 On Mar 10, 2:59 pm, Jacob Kaplan-Moss wrote: > On Tue, Mar 10, 2009 at 8:55 AM, jago wrote: > > Can this be done automatically in Python or Django? > > Yes; Django automatically escapes HTML values in > templates:http://docs.djangoproject

Encode Html for correct display in tags?

2009-03-10 Thread jago
Hi, I want to show some HTML code 'literally' within tags. Characters such as < > etc. have to be encoded as > and < Can this be done automatically in Python or Django? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Grou

Re: include file, filename itself is variable.

2009-03-07 Thread jago
Sorry. Found the problem. My bad - simple stupidity. --~--~-~--~~~---~--~~ 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 gr

Re: include file, filename itself is variable.

2009-03-07 Thread jago
Oh, actually I tried that but when it didn't work I got creative with {% include {{ include_filename }} %} I believe my problem is somewhere else. In my main HTML file index.html I use {% include "header_viz_js.html" %} in header_viz_js.html I use {% include template_name %} Result: header_vi

include file, filename itself is variable.

2009-03-07 Thread jago
Hi, I want to include a file using {% include "header.html" %} However I want to be able to dynamically use different files then "header.html" Obviously {% include {{ include_filename }} %} does not work. Can I make this work somehow? --~--~-~--~~~---~--~~ You

To-Go django based solutions for Google AppEngine?

2008-12-12 Thread jago
(not developers) could set up django based solutions such as: - blogs - websites - simple cms - photo-galleries - etc. One could offer such packages for download and 5-min deployment to Google AppEngine. I think many people would love this. What do you think? Cheers, jago

Can I perform calculations directly in django tags/filters?

2008-11-18 Thread jago
I am thinking about something like {{ (width - 5) *12 }} ? --~--~-~--~~~---~--~~ 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 fro

Inheritance example???

2008-11-18 Thread jago
le or blog entry. These templates extend the appropriate section template. " Does anybody have a really good example of a website (all code in a zip file if possible) that adheres to the inheritance principles above? Cheers, jago --~--~-~--~~~---~--~~ You rec

Re: Select a list item by index

2008-11-07 Thread jago
() operation? In the python code before constructing the template or in the django-code? wrapper = zip(list1, list2) Access in the django code is then: {% for w in wrapper %} w.0.title w.1 ??? On Nov 7, 4:45 pm, Daniel Roseman <[EMAIL PROTECTED]> wrote: > On Nov 7, 2:12 pm, jag

Re: Select a list item by index

2008-11-07 Thread jago
Roseman <[EMAIL PROTECTED]> wrote: > On Nov 7, 12:52 am, jago <[EMAIL PROTECTED]> wrote: > > > I have a for loop over a list A. > > > inside the loop I want to print out the item of list B at the index > > 'forloop.counter0' of list A. > > > I

Re: Select a list item by index

2008-11-07 Thread jago
select an item from arr using forloop.counter0 ? Thx...jago On Nov 7, 10:38 am, Raja <[EMAIL PROTECTED]> wrote: > You can use something like {{ array.index}} to get the value of a > specific index. > > For e.g. > > arr = [1,2,3,4] > > In view, if I do a > {{ arr.1 }

Select a list item by index

2008-11-06 Thread jago
I have a for loop over a list A. inside the loop I want to print out the item of list B at the index 'forloop.counter0' of list A. It is really strange. One can select randon items in a list, or the first item in a list, but I did not find a way to select the list item by index. Am I missing so