Reputation: 6686
Some time ago, reading the App Engine Cookbook, I found this recipe based on the Users API (Python): http://goo.gl/aQl45 But my question is: How do I create the Users Database? Where do I locate the "allowed users" list? I don't understand...
Can somebody explain me how to get that recipe working in an actual app?
Upvotes: 0
Views: 579
Reputation: 24956
In the middle of the page you link to, right below "Attached Files", are links to the three files that make up the sample app. The AuthorizedUser
table is defined at the top of auth.py
. You don't need to create that table manually in the same way you would with a relational database. You create AuthorizedUser entities and save (put) them, and App Engine takes care of giving you the illusion that there's a schema and that you have a table named AuthorizedUser
.
Re-read http://code.google.com/appengine/docs/python/datastore/datamodeling.html and note the bit that starts "A datastore entity has a key and a set of properties." That can take a while to sink in if you're as steeped in relational thinking as I was, but once you get it, App Engine gets a lot less mysterious.
Upvotes: 4