Name:
[008] Kyran Dale
Member:
91 months
Authored:
16 videos
Description:
I'm one of the co-founders of Showmedo and an academic researcher by profession. My peripatetic path has taken me from a Philosophy degree via Artificial Intelligence and Evolutionary Robotics to a PhD in Neuroscience. I spent five years in a small room with a colony of reluctant bumble-bees, becomi ...
Using Google's User Service [ID:721] (4/5)
in series: A Gentle Introduction to the Google App Engine Python SDK
video tutorial by Kyran Dale, added 05/08
Name:
[008] Kyran Dale
Member:
91 months
Authored:
16 videos
Description:
I'm one of the co-founders of Showmedo and an academic researcher by profession. My peripatetic path has taken me from a Philosophy degree via Artificial Intelligence and Evolutionary Robotics to a Ph ...
Our authors tell us that feedback from you is a big motivator. Please take a few moments to let them know what you think of their work.
The Google App Engine (GAE) Users service allows your application to integrate with Google user accounts. For example, if a user is logged into their Gmail account, they will be recognized and validated. While most web frameworks provide their own user-management systems the GAE User service has 'out of the box' convenience and leverages Google's experience, at the expense of some control and privacy.
# Using the User Service
import wsgiref.handlers
from google.appengine.api import users
from google.appengine.ext import webapp
class MainPage(webapp.RequestHandler):
def get(self):
user = users.get_current_user()
if user:
self.response.headers['Content-Type'] = 'text/plain'
self.response.out.write('Hello, ' + user.nickname())
else:
self.redirect(users.create_login_url(self.request.uri))
def main():
application = webapp.WSGIApplication(
[('/', MainPage)],
debug=True)
wsgiref.handlers.CGIHandler().run(application)
if __name__ == "__main__":
main()
#app.yaml config script:
#application: helloworld
#version: 1
#runtime: python
#api_version: 1
#handlers:
#- url: /.*
#script: helloworld.py
- python
- beginners
- programming
- code
- application
- introduction
- language
- development
- user
- web
- web_development
- databases
- systems
- control
- django
- good
- knowledge
- aims
- html
- app
- walkthrough
- forms
- management
- server
- starting
- frameworks
- while
- power
- jobs
- service
- WSGI
- pylons
- CGI
- handlers
- webapp
- hello-world
- SDK
- google-app-engine
- user-management
Got any questions?
Get answers in the ShowMeDo Learners Google Group.
Video statistics:
- Video's rank shown in the most popular listing
- Video plays: 134 (since July 30th)
- Plays in last week: 0
- Published: 61 months ago
Thank-yous, questions and comments
If this video tutorial was helpful please take some time to say thank-you to the authors for their hard work. Feel free to ask questions. Let the author know why their video tutorial was useful - what are you learning about? Did the video tutorial save you time? Would you like to see more?
You may also want to see our ShowMeDo Google Group to speak to our active users and authors.
All comments excluding tick-boxed quick-comments
Very nice video! So are the other parts of this series.
A note though: the video ended too "suddenly". At the end, it was not obvious for me that the video has really ended, I thought that there was some problem with my video player. It wasn't a problem with the first three videos -- firstly because you said what would come in the next video, and secondly because they did not end suddenly.
Keep up the good work and thanks again!
Ok, I see. On the first pass, the app asks you to login because "user" wasn't set. In the else branch we get the registration page that embeds a request back to 'MainPage'.
I need to brush up (google) on how the RequestHandlers, get, and post methods work in HTML.
the showmedo on video blocks example code in many shots, I am a SQL database programmer new to WEB programming. I have developed a Tennis schedulng package which I want to transfer to the WEB. I am trying Google Apps to do this. I hope you will produce a video that shows what you can do and what you can't do with Google Apps.
I need to be able to have a Web Page with many (8) list boxes, 10 combo boxes, 14 commoan buttons, etc. Can I?
Thanks
Fred Dunfey
Useful, I can see now it is convenient for Google, that programmers use their Google App Engine.
Video published, thanks for contributing to ShowMeDo
Video published, thanks for contributing to ShowMeDo
