<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>Marcus Whybrow - Latest Comments</title><link>http://marcuswhybrow.disqus.com/</link><description>My personal blog</description><atom:link href="https://marcuswhybrow.disqus.com/comments.rss" rel="self"></atom:link><language>en</language><lastBuildDate>Thu, 16 Feb 2012 20:50:03 -0000</lastBuildDate><item><title>Re: Creating a Cacti Alternative</title><link>http://marcuswhybrow.net/cacti-alternative/#comment-441478148</link><description>&lt;p&gt;Hi Frank, I haven't continued the project past its university life-time. I don't have a personal need for it anymore either so I guess I have to declare the project asleep.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Marcus Whybrow</dc:creator><pubDate>Thu, 16 Feb 2012 20:50:03 -0000</pubDate></item><item><title>Re: Creating a Cacti Alternative</title><link>http://marcuswhybrow.net/cacti-alternative/#comment-439993816</link><description>&lt;p&gt;Hey Marcus, how did it go, did you get started on the project? Sounds quite interesting with Protovis..&lt;/p&gt;&lt;p&gt;/franksemi&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Frank</dc:creator><pubDate>Wed, 15 Feb 2012 13:42:03 -0000</pubDate></item><item><title>Re: Creating a Cacti Alternative</title><link>http://marcuswhybrow.net/cacti-alternative/#comment-298917794</link><description>&lt;p&gt;ooooh eventlet and websockets .....now thats the business!&lt;/p&gt;&lt;p&gt;Have you looked at Python Flask? I tried to get into Django and bfg.....they just seemed too big for what I wanted (small Intranet webapps for financial clients) .... step in Python Flask.&lt;br&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Bruce Bushby</dc:creator><pubDate>Tue, 30 Aug 2011 15:41:36 -0000</pubDate></item><item><title>Re: What&amp;#8217;s the Deal&amp;nbsp;With: Django&amp;nbsp;Template Indentation</title><link>http://marcuswhybrow.net/django-template-indentation/#comment-140920763</link><description>&lt;p&gt;XML based templating languages solve this by using "dummy" elements, and they often reformat the output as well I guess. But the example I gave would solve the problem in Django for the majority of cases. For the rest of the cases, you just:&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;pre&gt;&amp;lt;div&amp;gt;&lt;br&gt;    {% for post in posts %}&lt;br&gt;    &amp;lt;div&amp;gt;{{ post.title }}&amp;lt;/div&amp;gt; &lt;br&gt;    &amp;lt;div&amp;gt;{{ post.body }}&amp;lt;/div&amp;gt;&lt;br&gt;    {% endfor %}&lt;br&gt;&amp;lt;/div&amp;gt;&lt;br&gt;&lt;/pre&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;It's not too bad because using XML based looping and conditional constructs will already give you the readability and indentation you want, so having a few "old-style" loops in the mix wouldn't affect the big picture.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Erik Allik</dc:creator><pubDate>Fri, 04 Feb 2011 19:27:07 -0000</pubDate></item><item><title>Re: What&amp;#8217;s the Deal&amp;nbsp;With: Django&amp;nbsp;Template Indentation</title><link>http://marcuswhybrow.net/django-template-indentation/#comment-140801754</link><description>&lt;p&gt;This would work nicely in the example you have provided, but this does not deal with repeating multiple elements. Moving the for loop definition to the parent &lt;code&gt;ul&lt;/code&gt; element would solve this issue, but introduces the new one of not including some elements in the iterative construction.&lt;/p&gt;&lt;p&gt;I think it comes down to being a restrictive problem, yes you can gain the desired output which we have been talking about, but at the cost of preventing some common use cases.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Marcus Whybrow</dc:creator><pubDate>Fri, 04 Feb 2011 15:57:02 -0000</pubDate></item><item><title>Re: What&amp;#8217;s the Deal&amp;nbsp;With: Django&amp;nbsp;Template Indentation</title><link>http://marcuswhybrow.net/django-template-indentation/#comment-140336241</link><description>&lt;p&gt;The fundamental issue is that the Django templating language is not meant to integrate with HTML (or XML based languages in general). Imagine if instead of wrapping an element with a for-endfor pair, you could:&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;pre&gt;&amp;lt;ul&amp;gt;&lt;br&gt;    &amp;lt;li django:for="post in posts"&amp;gt;{{ post.title }}&amp;lt;/li&amp;gt;&lt;br&gt;&amp;lt;/ul&amp;gt;&lt;br&gt;&lt;/pre&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;This would solve both the indenting issue, and the issue of duplication of information as the current &lt;code&gt;{% for %}{% endfor %}&lt;/code&gt; often duplicates the already existing structure.&lt;/p&gt;&lt;p&gt;Since it would probably be hopeless to ask this to be added in a future version of Django, I've thought of layering another language such as TAL on top of Django, i.e. first process the template with TAL, and then send to Django templating.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Erik Allik</dc:creator><pubDate>Fri, 04 Feb 2011 06:05:20 -0000</pubDate></item><item><title>Re: Django Preview</title><link>http://marcuswhybrow.net/django-preview/#comment-63080915</link><description>&lt;p&gt;Form preview locks you into a certain workflow and assumes you want to apply your changes at the end. I also want to create something that can just be enabled in your models with some minimal configuration on your part.&lt;br&gt;&lt;br&gt;Maybe I could use form previews in order to emulate these features, but I think it would be too limiting.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Marcus Whybrow</dc:creator><pubDate>Sun, 18 Jul 2010 17:00:14 -0000</pubDate></item><item><title>Re: Django Preview</title><link>http://marcuswhybrow.net/django-preview/#comment-63079071</link><description>&lt;p&gt;Couldn't django.contrib.formtools.preview be used?&lt;/p&gt;&lt;p&gt;&lt;a href="http://docs.djangoproject.com/en/dev/ref/contrib/formtools/form-preview/#ref-contrib-formtools-form-preview" rel="nofollow noopener" target="_blank" title="http://docs.djangoproject.com/en/dev/ref/contrib/formtools/form-preview/#ref-contrib-formtools-form-preview"&gt;http://docs.djangoproject.c...&lt;/a&gt;&lt;br&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">jakub</dc:creator><pubDate>Sun, 18 Jul 2010 16:38:42 -0000</pubDate></item><item><title>Re: Creating a Cacti Alternative</title><link>http://marcuswhybrow.net/cacti-alternative/#comment-61737605</link><description>&lt;p&gt;Google "mongodb ate my data"... It seems to me using another kv store like cassandra or even riak would be a much better idea.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Jeff Schroeder</dc:creator><pubDate>Mon, 12 Jul 2010 12:45:56 -0000</pubDate></item><item><title>Re: What&amp;#8217;s the Deal&amp;nbsp;With: Django&amp;nbsp;Template Indentation</title><link>http://marcuswhybrow.net/django-template-indentation/#comment-61700250</link><description>&lt;p&gt;Judging by the github README this:&lt;br&gt;&lt;/p&gt;&lt;pre&gt;%ul#atheletes&lt;br&gt;    - for athelete in athelete_list&lt;br&gt;        %li.athelete= athelete.name&lt;/pre&gt;&lt;p&gt;still turns into this:&lt;/p&gt;&lt;pre&gt;&amp;lt;ul id="atheletes"&amp;gt;&lt;br&gt;    {% for athelete in athelete_list %}&lt;br&gt;        &amp;lt;li class="athelete"&amp;gt;{{ athelete.name }}&amp;lt;/li&amp;gt;&lt;br&gt;    {% endfor %}&lt;br&gt;&amp;lt;/ul&amp;gt;&lt;/pre&gt;&lt;p&gt;Which doesn't solve the HTML indentation problem. However something like this could be the answer, and I have not looked at HamlPy in enough detail to know that it is not that answer.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Marcus Whybrow</dc:creator><pubDate>Mon, 12 Jul 2010 07:33:56 -0000</pubDate></item><item><title>Re: What&amp;#8217;s the Deal&amp;nbsp;With: Django&amp;nbsp;Template Indentation</title><link>http://marcuswhybrow.net/django-template-indentation/#comment-61695718</link><description>&lt;p&gt;Maybe let's change to different approach, if visual readablity of code matters.&lt;br&gt;&lt;a href="http://github.com/jessemiller/HamlPy" rel="nofollow noopener" target="_blank" title="http://github.com/jessemiller/HamlPy"&gt;http://github.com/jessemiller/HamlPy&lt;/a&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Jan Rzepecki</dc:creator><pubDate>Mon, 12 Jul 2010 06:16:45 -0000</pubDate></item><item><title>Re: What&amp;#8217;s the Deal&amp;nbsp;With: Django&amp;nbsp;Template Indentation</title><link>http://marcuswhybrow.net/django-template-indentation/#comment-60914845</link><description>&lt;p&gt;If you use spaceless as compression instead of gzip you, my good sir, are a retard. Ta.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Robert Frost</dc:creator><pubDate>Wed, 07 Jul 2010 07:10:36 -0000</pubDate></item><item><title>Re: What&amp;#8217;s the Deal&amp;nbsp;With: Django&amp;nbsp;Template Indentation</title><link>http://marcuswhybrow.net/django-template-indentation/#comment-60750499</link><description>&lt;p&gt;Yer that sounds like an efficient way to do things, what would be really cool is if the code was minified when &lt;code&gt;DEBUG = False&lt;/code&gt; and tidied when &lt;code&gt;DEBUG = True&lt;/code&gt;.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Marcus Whybrow</dc:creator><pubDate>Tue, 06 Jul 2010 08:09:29 -0000</pubDate></item><item><title>Re: What&amp;#8217;s the Deal&amp;nbsp;With: Django&amp;nbsp;Template Indentation</title><link>http://marcuswhybrow.net/django-template-indentation/#comment-60750253</link><description>&lt;p&gt;Maybe write a middleware that does post processing to tidy the html.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Harro van der Klauw</dc:creator><pubDate>Tue, 06 Jul 2010 08:06:09 -0000</pubDate></item><item><title>Re: What&amp;#8217;s the Deal&amp;nbsp;With: Django&amp;nbsp;Template Indentation</title><link>http://marcuswhybrow.net/django-template-indentation/#comment-60707209</link><description>&lt;p&gt;Just make sure your document is not broken. The browser doesn't care about the pretty indentation of your HTML. In fact, you *should* be minifing the most you can, as it's actually a site tuning recommendation, and even factors into Google's pagerank.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Henrique</dc:creator><pubDate>Mon, 05 Jul 2010 22:22:13 -0000</pubDate></item><item><title>Re: What&amp;#8217;s the Deal&amp;nbsp;With: Django&amp;nbsp;Template Indentation</title><link>http://marcuswhybrow.net/django-template-indentation/#comment-60599613</link><description>&lt;p&gt;I think I'd have to say that this probably lies in the category of problems that either don't really exist or don't need solving. After all, its not really a problem how the HTML looks as there are plenty of ways to view it and thus its not really a problem.&lt;/p&gt;&lt;p&gt;Besides, extra indentation hardly makes the HTML unreadable. Not like the output some websites create. Try looking at the output of a .NET site for example.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Dougal Matthews</dc:creator><pubDate>Mon, 05 Jul 2010 03:46:46 -0000</pubDate></item><item><title>Re: What&amp;#8217;s the Deal&amp;nbsp;With: Django&amp;nbsp;Template Indentation</title><link>http://marcuswhybrow.net/django-template-indentation/#comment-60442363</link><description>&lt;p&gt;Jinja2 deals with whitespace (at least partly) by allowing the user to append an - to templatetags: &lt;a href="http://jinja.pocoo.org/2/documentation/templates#whitespace-control" rel="nofollow noopener" target="_blank" title="http://jinja.pocoo.org/2/documentation/templates#whitespace-control"&gt;http://jinja.pocoo.org/2/do...&lt;/a&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">ericflo</dc:creator><pubDate>Sat, 03 Jul 2010 14:02:47 -0000</pubDate></item><item><title>Re: What&amp;#8217;s the Deal&amp;nbsp;With: Django&amp;nbsp;Template Indentation</title><link>http://marcuswhybrow.net/django-template-indentation/#comment-60436222</link><description>&lt;p&gt;Right, so you are putting more focus on getting the correct output rather than nicely indented template code?&lt;/p&gt;&lt;p&gt;Yes you are quite right about wrapping everything in an if statement in order to create valid HTML - validity is a different matter altogether, and an important one.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Marcus Whybrow</dc:creator><pubDate>Sat, 03 Jul 2010 13:10:34 -0000</pubDate></item><item><title>Re: What&amp;#8217;s the Deal&amp;nbsp;With: Django&amp;nbsp;Template Indentation</title><link>http://marcuswhybrow.net/django-template-indentation/#comment-60434137</link><description>&lt;p&gt;The first example you show, from the books, makes the most sense.&lt;/p&gt;&lt;p&gt;In the UL, when there are items, indent and print them. This is logical.&lt;/p&gt;&lt;p&gt;Your example, though, isn't since it automatically introduces a level of indentation regardless of if there are items or not.&lt;/p&gt;&lt;p&gt;(really the whole thing should be wrapped in an if anyway to prevent an empty UL)&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Kenneth Love</dc:creator><pubDate>Sat, 03 Jul 2010 12:49:18 -0000</pubDate></item><item><title>Re: What&amp;#8217;s the Deal&amp;nbsp;With: Django&amp;nbsp;Template Indentation</title><link>http://marcuswhybrow.net/django-template-indentation/#comment-60422358</link><description>&lt;p&gt;I agree. I think template code is much more important since that is where you (as the developer) are spending most of your time.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Marcus Whybrow</dc:creator><pubDate>Sat, 03 Jul 2010 10:51:04 -0000</pubDate></item><item><title>Re: What&amp;#8217;s the Deal&amp;nbsp;With: Django&amp;nbsp;Template Indentation</title><link>http://marcuswhybrow.net/django-template-indentation/#comment-60421959</link><description>&lt;p&gt;Django template code should be easy to read. I think thats most importatnt. If you need proper html indentation use &lt;a href="http://djangosnippets.org/snippets/172/" rel="nofollow noopener" target="_blank" title="http://djangosnippets.org/snippets/172/"&gt;http://djangosnippets.org/s...&lt;/a&gt; or firebug&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Morpho</dc:creator><pubDate>Sat, 03 Jul 2010 10:45:41 -0000</pubDate></item><item><title>Re: What&amp;#8217;s the Deal&amp;nbsp;With: Django&amp;nbsp;Template Indentation</title><link>http://marcuswhybrow.net/django-template-indentation/#comment-60421492</link><description>&lt;p&gt;If we don't care about the HTML, then we should stop sacrificing the templates indentation for no reason.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Marcus Whybrow</dc:creator><pubDate>Sat, 03 Jul 2010 10:38:21 -0000</pubDate></item><item><title>Re: What&amp;#8217;s the Deal&amp;nbsp;With: Django&amp;nbsp;Template Indentation</title><link>http://marcuswhybrow.net/django-template-indentation/#comment-60413754</link><description>&lt;p&gt;Who cares ?&lt;/p&gt;&lt;p&gt;If the machine read it, it doesn't matter.&lt;/p&gt;&lt;p&gt;If a human read it, he will use htmltidy or a firefox extension to get a readable output automatically.&lt;/p&gt;&lt;p&gt;It's really not something to waste your time on.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">ksamuel</dc:creator><pubDate>Sat, 03 Jul 2010 09:42:51 -0000</pubDate></item><item><title>Re: What&amp;#8217;s the Deal&amp;nbsp;With: Django&amp;nbsp;Template Indentation</title><link>http://marcuswhybrow.net/django-template-indentation/#comment-60406386</link><description>&lt;p&gt;If it were the case that nobody ever needed to look at the HTML code of a site, we should be just be minifying the whole thing. The fact that we don't (in most cases) suggests that generating legible HTML is somewhat important.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Marcus Whybrow</dc:creator><pubDate>Sat, 03 Jul 2010 07:37:24 -0000</pubDate></item><item><title>Re: What&amp;#8217;s the Deal&amp;nbsp;With: Django&amp;nbsp;Template Indentation</title><link>http://marcuswhybrow.net/django-template-indentation/#comment-60406086</link><description>&lt;p&gt;ok Nestor, i got your point. i dont have that case very often. but in case i use firebug, edit the parsed dom-tree on-the-fly and copy everything in my django templates. that works best for me.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Morpho</dc:creator><pubDate>Sat, 03 Jul 2010 07:33:26 -0000</pubDate></item></channel></rss>