I need to get an instance from a key from ndb. The key may have a parent key, but I don't want to pass any parent keys to the url, because I want a nice looking url. I don't want to pass the entire key string to the url either. Is this possible?
相关问题
- how to define constructor for Python's new Nam
- streaming md5sum of contents of a large remote tar
- How to get the background from multiple images by
- Evil ctypes hack in python
- Correctly parse PDF paragraphs with Python
It's possible. But parent key will be static in your code.
When you get numeric id, you just reconstruct key.
'Somekind' is name of parent class. 'somevalue' is string id of parent class. 'kindOfInstance' is name of instance class. You may use just class without quotes.