• You are right – form POST url’s aren’t presentation data.
    But you can easily do:
    and set your context accordingly.

    With regard to templates. I agree with you to a certain degree – but the design decisions for Django templates have been fairly explicitly set out. They are intended for use by non-programmers and they are intended to discourage putting very much control flow in your presentation layer. You should be doing that work either in views or in template tags.

  • Yes, but it’s somewhat…not natural. I like Zend Framework’s way better. Don’t get me wrong, this is not a django bashing post, I’ll keep on using django from now on. I’m just highlighting its strong and weak points, as seen from my perspective.

    PS: You can use <pre lang=”python”> to post code.

  • (second attempt at a comment as my html was stripped rather than encoded)

    You are right – form POST url’s aren’t presentation data.
    But you can easily do:

    and set your context accordingly.

    With regard to templates. I agree with you to a certain degree – but the design decisions for Django templates have been fairly explicitly set out. They are intended for use by non-programmers and they are intended to discourage putting very much control flow in your presentation layer. You should be doing that work either in views or in template tags.

Advertisment ad adsense adlogger