[Tutor] Python / CGI

Fiyawerx fiyawerx at gmail.com
Fri Sep 7 17:49:12 CEST 2007


Wow, thanks for all the info guys, more than i was expecting :). After
looking around at various options, I did download the python gdata module
for google's calendar. What I'm thinking is, since my fiance has two
schools, she can just log into her google account and create a calendar for
each school. I'm going to try to make a custom cgi front-end that will pull
the data, and offer 'slots' to sign up for. When you sign up for a slot, you
have to use a username for the front-end, I'm thinking I can store them in a
db. That way I don't have to worry about everyone needing google calendars
to be able to access hers. So when someone picks a slot and submits it, the
program behind the scenes will actually just use her google account to
submit, and append the username to the entry, so you can tell who did what,
but it still will only require one real google account. Gdata comes with
some really nice samples, one that basically does any of the calendar
functions i'm going to need, so I think I should bea ble to rip the code out
of that module to use, so I still get to learn the cgi doing my front-end,
but that way I know I have a well functioning back-end to easy some of my
troubles.

http://code.google.com/apis/calendar/developers_guide_python.html

Here is a bit of the output from their 'sample' python script that comes
with the package.

--------

C:\Python25\gdata.py-1.0.8\samples\calendar>python calendarExample.py --user
fiyawerx at gmail.com --pw xxxxxxx
Printing allcalendars: Lee McClintock's Calendar List
0. Lee McClintock
Printing owncalendars: Lee McClintock's Calendar List
0. Lee McClintock
Events on Primary Calendar: Lee McClintock
0. Rent
0. fiyawerx at gmail.com
Lee McClintock
None
Full text query for events on Primary Calendar: 'Tennis'
Date range query for events on Primary Calendar: 2007-01-01 to 2007-07-01
0. Rent
Start time: 2007-03-01
End time: 2007-03-02
Start time: 2007-06-01
End time: 2007-06-02
Start time: 2007-01-01
End time: 2007-01-02
Start time: 2007-05-01
End time: 2007-05-02
Start time: 2007-04-01
End time: 2007-04-02
Start time: 2007-02-01
End time: 2007-02-02
New single event inserted:
http://www.google.com/calendar/feeds/default/private/full/cmvade9oqrd95oeaaf9b7ha5cc
Event edit URL:
http://www.google.com/calendar/feeds/default/private/full/cmvade9oqrd95oeaaf9b7ha5cc/63324787637
Event HTML URL:
http://www.google.com/calendar/event?eid=Y212YWRlOW9xcmQ5NW9lYWFmOWI3aGE1Y2MgZml5YXdlcnhAbQ
Updating title of event from:'One-time Tennis with Beth' to:'New title for
single event'
Adding 30 minute reminder to event
Adding extended property to event: 'propname'='propvalue'
New recurring event inserted:
http://www.google.com/calendar/feeds/default/private/full/dpjp06smht75o466g8s0gfdnro
Event edit URL:
http://www.google.com/calendar/feeds/default/private/full/dpjp06smht75o466g8s0gfdnro/63324787638
Event HTML URL:
http://www.google.com/calendar/event?eid=ZHBqcDA2c21odDc1bzQ2Nmc4czBnZmRucm9fMjAwNzA1MDEgZml5YXdlcnhAbQ
Inserting Simple Web Content Event
Inserting Web Content Gadget Event
Lee McClintock's access control list
0. owner
Role: http://schemas.google.com/gCal/2005#owner
Scope user - fiyawerx at gmail.com
1. editor
Role: http://schemas.google.com/gCal/2005#editor
Scope user - poprockpixie at yahoo.com
freebusy
Role: http://schemas.google.com/gCal/2005#freebusy
Scope user - user at gmail.com
Creating new calendar with title "Little League Schedule"
Updating the calendar titled "Little League Schedule" with the title "New
Title"
Subscribing to the calendar with ID:
c4o4i7m2lbamc4k26sc2vokh5g%40group.calendar.google.com
Updating the calendar subscription with ID:
c4o4i7m2lbamc4k26sc2vokh5g%40group.calendar.google.com

------

So it seems it already has samples of anything I'm going to need to do.

(Got a message that the mail bounced due to being too learge, cut out the
quoted section)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/tutor/attachments/20070907/b00df54d/attachment-0001.htm 


More information about the Tutor mailing list