On Aug 2, 7:35 am, aleph <ustev...@yandex.ru> wrote: > Hi! > > My questions is about "the right way to do it" in Django: I have a > simple message board with two columns: news on the left, the board > itself (input form and messages list) on the right. In fact, this are > two different applications presented in one page. It seems natural to > have a template with <div id="news"> on the left and <div id="board"> > on the right and some elegant way to direct the output of > corresponding apps into these two placeholders. > > Of course, it can be done with simple AJAX trick, but what confuses me > a lot here is that I can't find a simple server-side way to do it in > Django - only template inheritence and those block which are not what > I need I suppose. > > In general, it seems to me that Django doesn't want you to think about > page as of set of independent rectangular areas with independent > rendering and behaviour (call the components or widgets, whatever) and > it seems very strange because at first this is the common way to think > about it in UI programming (compare with Mason e.g.) and at the second > jango has this beautifull apps concept that maps so great on the idea > of UI components. > > Can you correct me and whats your ideas about it?... > > regardz, > Ilya.
On the contrary, Django has excellent support for this - I don't know why your searches failed to turn anything up. The answer of course is to use template tags. The standard reference on this is James Bennett's excellent post: http://www.b-list.org/weblog/2006/jun/07/django-tips-write-better-template-tags/ (although it's slightly out of date as there are now some helpful decorators to take away some of the boilerplate code, see the normal documentation). -- DR. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---