Re: random quote help

2008-10-08 Thread Steve Holden
Bobby Roberts wrote: >> Is your problem the mechanics of *making* the random choice, or are you >> uncertain how to get it into your output? >> > > Hi Steve - > > Yeah i know the randomization needs to be in the view and then pushed > back to the template. How would I call the view on each p

Re: random quote help

2008-10-08 Thread Benjamin Buch
Am 08.10.2008 um 10:33 schrieb David Reynolds: > On 8 Oct 2008, at 4:05 am, Bobby Roberts wrote: > >> Yeah i know the randomization needs to be in the view and then pushed >> back to the template. How would I call the view on each page in the >> website? > > > Use a template tag. > > Oh and Quo

Re: random quote help

2008-10-08 Thread David Reynolds
On 8 Oct 2008, at 4:05 am, Bobby Roberts wrote: > Yeah i know the randomization needs to be in the view and then pushed > back to the template. How would I call the view on each page in the > website? Use a template tag. Oh and Quote.objects.order_by('?')[0] is probably what you want -- Da

Re: random quote help

2008-10-07 Thread Steve Holden
Bobby Roberts wrote: > Hi. I have a project with one template only. I am trying to get a > random quote from the database pushed up to the template so that a new > quote is shown with each new page url or each page refresh. Can > someone point out in the docs where this is covered or help me >

Re: random quote help

2008-10-07 Thread Bobby Roberts
> Is your problem the mechanics of *making* the random choice, or are you > uncertain how to get it into your output? Hi Steve - Yeah i know the randomization needs to be in the view and then pushed back to the template. How would I call the view on each page in the website? thanks in advance

random quote help

2008-10-07 Thread Bobby Roberts
Hi. I have a project with one template only. I am trying to get a random quote from the database pushed up to the template so that a new quote is shown with each new page url or each page refresh. Can someone point out in the docs where this is covered or help me understand the urls.py structur