Re: Designing for Speed - conditionals inside the view versus the template

2007-03-12 Thread Bill de hOra
Merric Mercer wrote: > 1. Design a template with lots of {% if %} conditional statements > > 2. Do the bulk of the work in the view, by doing something like:- > > 3. Do a combination of the two above 4: Caching? cheers Bill --~--~-~--~~~---~--~~ You re

Re: no-database models?

2006-12-04 Thread Bill de hOra
[EMAIL PROTECTED] wrote: > Russ, > > Because it seems like the cleanest way of pulling together a wide > variety of content that all pertains to a particular day, or list of > days. I would have used an "event" rather than a "day" to model this. You can still (sensibly imo) argue that

Re: accumulating a query filter

2006-11-29 Thread Bill de hOra
James Bennett wrote: > Doing NodeEvent.objects.filter(**kwargs) should work ^^ I was passing it in without the **; arrhhh anyway this the idiom I ended up with for a different model: [[[ if request.has_key('q'): # GET form new_data = reques

accumulating a query filter

2006-11-29 Thread Bill de hOra
Hi, Suppose you have 2 fields in a query form, both of which are optional. Is there an idiom for building a dictionary to pass into objects.filter() instead of checking the permutations? eg instead of crazy stuff like this: [[[ if use_sources and use_level: results = NodeEvent.object

Re: A Rails/Django Comparison

2006-11-14 Thread Bill de hOra
Alan Green wrote: > Greetings fellow Djangonauts, > > Later this year, at the Open Source Developer's Conference in > Melbourne, Australia, Ben Askins and I will be presenting a paper > comparing Rails and Django. > > The paper is currently available on Google docs: > http://docs.google.com/View

Re: Django, RDF & XUL

2006-11-10 Thread Bill de hOra
benj wrote: > Hi folks, > After using django for a number of more conventional projects, I'm > toying around with trying to use it to drive a XUL application. Using > django's template system to generate XUL views is easy enough, as is > passing serialized objects around with AJAX. However, most o

Re: how are you handling i18n and m10l content?

2006-11-07 Thread Bill de hOra
Jacob Kaplan-Moss wrote: > Hey Bill -- > > *Great* question. We've talked a few times to newspapers who cross-publish > (usually in English and Spanish), and at least in the news industry there's > pretty much nothing that makes that process easy. I would absolutely love to > have a standard

how are you handling i18n and m10l content?

2006-11-07 Thread Bill de hOra
Hey, I know Django has solid i18n support for templates/strings and content negotiation in the request. But I was wondering how people are going about managing translations of content or having a multilingual website - eg supporting features like "read this in newspeak", or "browse this site

Re: Session problems

2006-11-03 Thread Bill de hOra
Bill de hOra wrote: > > http://www.djangoproject.com/documentation/cache/ One other thing; be sure you are only ever issuing the initial cookie with POST request and not a GET. cheers Bill --~--~-~--~~~---~--~~ You received this message because y

Re: Session problems

2006-11-03 Thread Bill de hOra
Jakub Labath wrote: > Hi All, > > I have serious problem with my django websites. > I've experienced random user switching. > > User A logs in and user B logs in they both surf the site for a bit > then all of a sudden the user B is now user A. > > So far I tracked it down to the fact that the