예제 #1
0
from google.appengine.ext import webapp
from google.appengine.ext.webapp.util import run_wsgi_app
from google.appengine.ext.webapp.mail_handlers import InboundMailHandler 
from util.MailHandler import MailHandler
import logging, email, os
import controllers.Misc
import controllers.Feed

ROOT_DIR = os.path.dirname(__file__)

application = webapp.WSGIApplication(
                                     [MailHandler.mapping()
                                      ,('/',controllers.Misc.NotFound)
                                      ,('/feed/show',controllers.Feed.Show)
                                      ,('/feed/list',controllers.Feed.List)
                                      ],
                                     debug=True)

def main():
    run_wsgi_app(application)

if __name__ == "__main__":
    main()
예제 #2
0
from google.appengine.ext import webapp
from google.appengine.ext.webapp.util import run_wsgi_app
from google.appengine.ext.webapp.mail_handlers import InboundMailHandler 
from util.MailHandler import MailHandler
import logging, email, os
import controllers.Misc
import controllers.Feed
import controllers.Home
import controllers.Register

ROOT_DIR = os.path.dirname(__file__)

application = webapp.WSGIApplication([
                                      MailHandler.mapping() #Used for email post mapping 
                                    ,(r'/view/(.*)/(.*)', controllers.Feed.ShowMessage) #show feed message  
                                    ,(r'/view/(.*)', controllers.Feed.ShowAll) #user web feed                                    
                                    ,(r'/rss/(.*)', controllers.Feed.ShowRSS) #user RSS feed
                                    ,('/',controllers.Home.Index) #Home page 
                                    ,('/help', controllers.Home.Help) #Help page                                    
                                    ,('/register', controllers.Register.Check) #Registration page                                  
                                    ,(r'/(.*)', controllers.Feed.ShowAtom) #user Atom Feed 
                                      ],
                                     debug=True)

def main():
    run_wsgi_app(application)

if __name__ == "__main__":
    main()