I am newbie in Google App Engine. While I was going through the tutorial, I found several things that we do in php-mysql is not available in GAE. For example in dataStore auto increment feature is not available. Also I am confused about session management in GAE. Over all I am confused and can not visualize the whole thing.
Please advise me a simple user management system with user registration, user login, user logout, session (create,manage,destroy) with data Store. Also please advise me where I can get simple but effective examples.
Thanks in advance.
Django is your best bet -- with the version I pointed you to, auth and sessions should both "just work" as per the Django docs. this article gives simple instructions and example of how to proceed from there.
For Django sessions, see here; for Django auth, here.
You don't write user management and registration and all that, because you use Google's own authentication services. This is all included in the App Engine documentation.
I tend to use my own user and session manangement
For my web handlers I will attach a decorator called
session
and one calledauthorize
. Thesession
decorator will attach a session to every request, and theauthorize
decorator will make sure that the user is authorised.(A word of caution, the authorize decorator is specific to how I develop my applications - the username being the first parameter in most requests).
So for example a web handler may look like:
In the above code, the
session
decorator attaches some session stuff that I need based on the cookies that are present on the request. Theauthorize
header will make sure that the user can only access the page if the session is the correct one.The decorators code are below: