You've defined a request handler class called 'Request'. You're trying to
treat it like a datastore model - I'm guessing you have a model by the same
name.

Your options are to either rename one of them, or import the model from
another module using a qualified import (eg, models.Request).

-Nick Johnson

On Thu, Apr 22, 2010 at 11:22 PM, Delacroy <[email protected]> wrote:

> I'm stumped!
>
> I'm running SDK 1.3.3. Here's my handler:
> from google.appengine.ext import webapp
>
> class Request(webapp.RequestHandler):
>        def get(self):
>
>                greetings_query = Request.all().order('-pub_date')
>                greetings = greetings_query.fetch(10)
>
>                template_values = {'page_title': 'Requests',
>                                                   'customer' : customer,
>                                                   'service' : service,
>                                                   'pub_date' : pub_date
>                          }
>                self.response.out.write(template.render('templates/request/
> request.html', template_values))
>
>
>
> I cant understand this....
> Traceback (most recent call last):
>  File "C:\Program Files\Google\google_appengine\google\appengine\ext
> \webapp\__init__.py", line 511, in __call__
>    handler.get(*groups)
>  File "c:\app\handlers\request.py", line 7, in get
>    greetings_query = Request.all().order('-pub_date')
> AttributeError: type object 'Request' has no attribute 'all'
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<google-appengine%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/google-appengine?hl=en.
>
>


-- 
Nick Johnson, Developer Programs Engineer, App Engine Google Ireland Ltd. ::
Registered in Dublin, Ireland, Registration Number: 368047
Google Ireland Ltd. :: Registered in Dublin, Ireland, Registration Number:
368047

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.

Reply via email to