Post Blast From Windows Desktop by Post.ly to tw,fb,wp,ps

Autopost

Checkout my “Posting From Windows Desktop” previous post on posterous.com It shows Python source code to post to posterous.com.

This post is being autoposted by Post.ly to:

Advertisements

Web2py URL Mapping

URL Mapping from the Book Chapter 4 – Dispatching. These are the basics there’s more detail in the book.

The URL    http://site.com/a/c/f    maps to:

The function f() in controller “c.py” in application “a“.

  • If f is not present, web2py defaults to the index controller function.
  • If c is not present, web2py defaults to the default.py controller.
  • If a is not present, web2py defaults to the init application.
  • If there is no init application, web2py tries to run the welcome application.
  • The extension .html is optional.
  • The extension .html is assumed as default.
  • The extension determines the extension of the view that renders the output of the controller function f().
  • The extension allows the same content to be served in multiple formats (html, xml, json, rss, etc.).

Web2py maps GET/POST requests of the form:

http://site.com/a/c/f.html/x/y/z?p=1&q=2

As before, to function f in controller “c.py” in application a

and it stores the URL parameters in the requestvariable as follows:

    request.args = ['x', 'y', 'z']
    request.vars = {'p':1, 'q':2}
    request.application = 'a'
    request.controller = 'c'
    request.function = 'f'

    request.url = url of request
    request.ajax = False  #by default
    if request.ajax == True and wasInitiatedByAWeb2pyComponent:
        request.cid = componentName

OAuth UML Sequence Diagrams

Here’s two diagrams i found describing the OAuth Workflow.

The first is from dev.twitter due to @idangazit. I found the second on a Japanese website, I believe it is sourced at a VERY COOL website that lets you create UML Sequence Diagrams online, WebSequenceDiagrams.com.

Here is the First from dev.twitter due to @idangazit.

dev.twitter OAuth Workflow

Here’s the second from WebSequenceDiagrams.com