You need to write something along the lines:
You need to add .get() or .fetch(1) at the end of the query because
otherwise you are passing a query object to the Form constructor...
defect=db.GqlQuery("SELECT * FROM DetailScreen WHERE defect_id =
'D-001' ").get()
f = DetailScreenForm(instance=defect)
On Jun 8, 4:57 am, diti <[email protected]> wrote:
> hi
>
> I am trying to create a create a form out of model .
>
> I then called the form passing instance of model in django application
> like
>
> defect=DetailScreen.objects.get(defect_id='D-001' )
> f = DetailScreenForm(instance=defect)
>
> I could see the form with the values in it.
>
> While trying to port application to GAE ,,
> I made the necessary changes in moel n moedlform
>
> I called the form like:
> defect=db.GqlQuery("SELECT * FROM DetailScreen WHERE defect_id =
> 'D-001' ")
> f = DetailScreenForm(instance=defect)
>
> But it is given me an error
>
> Exception Type: AttributeError
> Exception Value: 'GqlQuery' object has no attribute 'properties'
> Exception Location: E:\GoogleAppEngine\google\appengine\ext\db
> \djangoforms.py in __init__, line 748
>
> Plz provide a answer for it.
> It is urgently req.
>
> Plz reply to this mail on [email protected] as well.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---