So, I have an app that I have been running locally, but now want to get a little more serious about and bring into Eclipse. This app works from the command line, but not form within Eclipse. I keep getting this error.
ImportError: has no attribute app
I am able to run other GAE apps from within eclipse, so I'm pretty sure my run configurations are fine.
Here is my app.yaml
application: sandy-helping-hands version: 1 runtime: python27 api_version: 1 threadsafe: yes handlers: - url: /favicon\.ico static_files: favicon.ico upload: favicon\.ico - url: /stylesheets static_dir: stylesheets expiration: "7d" - url: /icons static_dir: icons expiration: "7d" - url: /javascript static_dir: javascript expiration: "7d" - url: /closure/goog static_dir: closure_lib/closure/goog expiration: "7d" - url: /closure/css static_dir: closure_lib/closure/goog/css expiration: "7d" - url: .* script: main.app secure: always libraries: - name: webapp2 version: "2.3" - name: jinja2 version: latest builtins: - appstats: on - remote_api: on Here is main.py
#!/usr/bin/env python import datetime import jinja2 import json import os import webapp2 from webapp2_extras import routes # Local libraries. import authentication_handler import base import delete_handler import edit_handler import export_handler import form_handler import import_handler import key import map_handler import print_handler import problem_handler import refresh_handler import site_ajax_handler import site_api_handler import sites_handler jinja_environment = jinja2.Environment( loader=jinja2.FileSystemLoader(os.path.dirname(__file__))) MAP_URL = "http://maps.google.com/?q=http://www.aarontitus.net/maps/sandy_work_orders.kmz" SPREADSHEET_URL = "https://docs.google.com/spreadsheet/ccc?key=0AhBdPrWyrhIfdFVHMDFOc0NCQjNNbmVvNHJybTlBUXc#gid=0" class LogoutHandler(base.RequestHandler): def get(self): self.response.headers.add_header("Set-Cookie", key.GetDeleteCookie()) self.redirect("/authentication") class Route(routes.RedirectRoute): def __init__(self, *args, **kwargs): # This causes a URL to redirect to its canonical version without a slash. # See http://webapp-improved.appspot.com/api/webapp2_extras/routes.html#webapp2_extras.routes.RedirectRoute if 'strict_slash' not in kwargs: kwargs['strict_slash'] = True routes.RedirectRoute.__init__(self, *args, **kwargs) app = webapp2.WSGIApplication([ Route(r'/refresh_counties', refresh_handler.RefreshHandler, name='refresh_counties'), Route(r'/old', redirect_to=SPREADSHEET_URL, name='spreadsheet_redirect'), Route(r'/api/site', site_api_handler.SiteApiHandler, 'site_api'), Route(r'/api/site_ajax', site_ajax_handler.SiteAjaxHandler, 'site_ajax'), Route(r'/authentication', authentication_handler.AuthenticationHandler, 'auth'), Route(r'/export', export_handler.ExportHandler, 'export'), Route(r'/logout', LogoutHandler, 'logout'), Route(r'/delete', delete_handler.DeleteHandler, 'delete'), Route(r'/dev', form_handler.FormHandler, 'dev'), Route(r'/', form_handler.FormHandler, 'dev'), Route(r'/dev/map', map_handler.MapHandler, 'map'), Route(r'/dev/maps', redirect_to_name='map', name='maps_redirect'), Route(r'/map', map_handler.MapHandler, 'map'), Route(r'/maps', redirect_to_name='map', name='maps_redirect'), Route(r'/edit', edit_handler.EditHandler, 'edit'), Route(r'/import', import_handler.ImportHandler, 'import'), Route(r'/old/map', redirect_to=MAP_URL, name='external_map_redirect'), Route(r'/old/maps', redirect_to_name=MAP_URL, name='external_maps_redirect'), Route(r'/print', print_handler.PrintHandler, 'print'), Route(r'/problems', problem_handler.ProblemHandler, 'problems'), Route(r'/sites', sites_handler.SitesHandler, 'sites') ], debug=True) So, clearly I have main.app... any ideas?
mad cow pennsylvania primary jerome simpson hand sanitizer obama on jimmy fallon google drive apple stock
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.