Re: Generic views problem

2009-07-07 Thread Owen Jeremiah
9 06:44:09 To: Django users Subject: Re: Generic views problem Do you have any Poll objects in the database? If not, add some using the admin interface. Assuming you do however, can we see your index view function? The one from step 3 of the tutorial under "Write views that actual

Re: Generic views problem

2009-07-07 Thread Andrew Fong
Do you have any Poll objects in the database? If not, add some using the admin interface. Assuming you do however, can we see your index view function? The one from step 3 of the tutorial under "Write views that actually do something". -- Andrew On Jul 7, 6:39 am, "Owen Jeremiah" wrote: > I'm

Generic views problem

2009-07-07 Thread Owen Jeremiah
I'm following the tutorial from django documentation and got to part 4 about generic views. But I can't get the Poll objects in my dictionary, and the result is 'No polls are available.' I'm running this in Ubuntu 9.04 with Python 2.6 and Django 1.0.2 installed. I would appreciate it if somebod

Re: Generic Views - problem with template missing

2007-01-30 Thread James Bennett
On 1/26/07, Panos Laganakos <[EMAIL PROTECTED]> wrote: > Though, not sure what "in the future" means. a matter of the date not > being the same in the db and the server or something? Care to explain? Well, let's take a simple example. Today is January 30; if you were to go hit a generic view, an

Re: Generic Views - problem with template missing

2007-01-29 Thread Honza Král
On 1/27/07, Panos Laganakos <[EMAIL PROTECTED]> wrote: > > I've added the allow_future option, and indeed it worked. Thanks alot! > > Though, not sure what "in the future" means. a matter of the date not > being the same in the db and the server or something? Care to explain? the thing is that in

Re: Generic Views - problem with template missing

2007-01-26 Thread Panos Laganakos
I've added the allow_future option, and indeed it worked. Thanks alot! Though, not sure what "in the future" means. a matter of the date not being the same in the db and the server or something? Care to explain? On Jan 26, 1:08 am, "James Bennett" <[EMAIL PROTECTED]> wrote: > On 1/20/07, Panos L

Re: Generic Views - problem with template missing

2007-01-25 Thread James Bennett
On 1/20/07, Panos Laganakos <[EMAIL PROTECTED]> wrote: > Indeed, that did it. Though, I'm curious, as there's already content in > the posts table, shouldn't these show up as I've defined them in the > template? Do the Posts already in the table have their pub_date in the future, by any chance?

Re: Generic Views - problem with template missing

2007-01-25 Thread [EMAIL PROTECTED]
Can you post the working urls.py file? Thanks. On Jan 20, 1:22 pm, "Panos Laganakos" <[EMAIL PROTECTED]> wrote: > On Jan 20, 9:11 pm, "Guillermo Fernandez Castellanos" > > <[EMAIL PROTECTED]> wrote: > > Maybe you need the allow_empty=True option in your urls.py.Indeed, that did > > it. Though, I

Re: Generic Views - problem with template missing

2007-01-20 Thread Panos Laganakos
On Jan 20, 9:11 pm, "Guillermo Fernandez Castellanos" <[EMAIL PROTECTED]> wrote: > Maybe you need the allow_empty=True option in your urls.py. Indeed, that did it. Though, I'm curious, as there's already content in the posts table, shouldn't these show up as I've defined them in the template?

Re: Generic Views - problem with template missing

2007-01-20 Thread Guillermo Fernandez Castellanos
Maybe you need the allow_empty=True option in your urls.py. G On 1/20/07, Panos Laganakos <[EMAIL PROTECTED]> wrote: > > I'm using Django 0.95 release. > > I've got a simple blog, which I wanna move to generic views. > > in settings.py: > TEMPLATE_DIRS = ( > '/home/panos/projects/panos/templ

Generic Views - problem with template missing

2007-01-20 Thread Panos Laganakos
I'm using Django 0.95 release. I've got a simple blog, which I wanna move to generic views. in settings.py: TEMPLATE_DIRS = ( '/home/panos/projects/panos/templates', ) in ./blog/urls.py: from django.conf.urls.defaults import * from panos.blog.models import Post info_dict = { 'queryset

Re: Generic views - problem(s)

2005-09-17 Thread PythonistL
Jacob, thanks a lot for help. I have one more question: You advised extra_lookup_kwargs = { 'order_by' : ['Email'], 'limit': 15, } ( with equal sign ) but it also works with ' : ' like this 'extra_lookup_kwargs' : { 'order_by' : ['Email'], 'limit': 15,} is there any difference? Th

Re: Generic views - problem(s)

2005-09-17 Thread Jacob Kaplan-Moss
On Sep 17, 2005, at 8:14 AM, PythonistL wrote: registrations.get_list(order_by=['Email'], limit=35) that it can be used in 'extra_lookup_kwargs'syntax ? extra_lookup_kwargs = { 'order_by' : ['Email'], 'limit': 15, } 2. How can I use the result of the query in my templates?

Generic views - problem(s)

2005-09-17 Thread PythonistL
A docs about generic views say that all date-based generic views have the following optional arguments: ## template_name - Overrides the default template name used for the view. extra_lookup_kwargs - A dictionary of extra lookup parameters extra_context - A dictionary of ex