Hi folks, this error does not make sense to me:
KindError: Kind 'MemberRecord' is not a subclass of kind
'MemberRecord'
Here is how it was generated: My fledgling app is a simple membership
management database which I display in a table. Each row of the table
includes an item 'edit' and an item 'delete'. These two items are
links formed like this:
{% ifequal user.atleast2 'True' %}
<td><a href='/membership/edit?rec={{ rec.key }}'>edit</a></
td>
{% endifequal %}
{% ifequal user.atleast3 'True' %}
<td><a href='/membership/del?del={{ rec.key }}'>delete</a></
td>
{% endifequal %}
That part works just fine. So in the edit.py an del.py get() handlers
I have logic to manipulate the database as required. The edit script
works perfectly. The del.py script produces the above error. Here is
how I am trying to delete the record:
class Handler(webapp.RequestHandler):
def get(self):
entity_to_del = self.request.get('del')
rec = d.MemberRecord.get(entity_to_del)
rec.delete()
self.redirect('/membership/view')
This method of using a url variable for passing a key to the scripts
seems to be solid. It works as expected for editing datastore entities
but not for deleting them. Any ideas as to what I could be running
into?
--
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.