No description
Find a file
Ed Brannin 7a7a163ff1 shorten output when ImportError due to app bug.
Before:
```
C:\dev\tmp>py -2 -m flask run
Traceback (most recent call last):
  File "C:\Python27\lib\runpy.py", line 174, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "C:\Python27\lib\runpy.py", line 72, in _run_code
    exec code in run_globals
  File "c:\dev\sourcetree\flask\flask\__main__.py", line 15, in <module>
    main(as_module=True)
  File "c:\dev\sourcetree\flask\flask\cli.py", line 523, in main
    cli.main(args=args, prog_name=name)
  File "c:\dev\sourcetree\flask\flask\cli.py", line 383, in main
    return AppGroup.main(self, *args, **kwargs)
  File "C:\Python27\lib\site-packages\click\core.py", line 697, in main
    rv = self.invoke(ctx)
  File "C:\Python27\lib\site-packages\click\core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "C:\Python27\lib\site-packages\click\core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "C:\Python27\lib\site-packages\click\core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "C:\Python27\lib\site-packages\click\decorators.py", line 64, in new_func
    return ctx.invoke(f, obj, *args[1:], **kwargs)
  File "C:\Python27\lib\site-packages\click\core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "c:\dev\sourcetree\flask\flask\cli.py", line 433, in run_command
    app = DispatchingApp(info.load_app, use_eager_loading=eager_loading)
  File "c:\dev\sourcetree\flask\flask\cli.py", line 153, in __init__
    self._load_unlocked()
  File "c:\dev\sourcetree\flask\flask\cli.py", line 177, in _load_unlocked
    self._app = rv = self.loader()
  File "c:\dev\sourcetree\flask\flask\cli.py", line 238, in load_app
    rv = locate_app(self.app_import_path)
  File "c:\dev\sourcetree\flask\flask\cli.py", line 91, in locate_app
    __import__(module)
  File "C:\dev\tmp\error.py", line 1, in <module>
    import whatisthisidonteven
ImportError: No module named whatisthisidonteven
```

After:
```
C:\dev\tmp>py -2 -m flask run
Usage: python -m flask run [OPTIONS]

Error: There was an error trying to import the app (error):
Traceback (most recent call last):
  File "c:\dev\sourcetree\flask\flask\cli.py", line 91, in locate_app
    __import__(module)
  File "C:\dev\tmp\error.py", line 1, in <module>
    import whatisthisidonteven
ImportError: No module named whatisthisidonteven```
2017-03-21 15:22:15 -04:00
.github Improve GitHub issue template 2016-06-02 23:27:41 +02:00
artwork Added lineart logo 2015-10-01 13:58:48 +02:00
docs Use print function in quickstart (#2204) 2017-03-13 13:58:24 +01:00
examples Migrate various docs links to https (#2180) 2017-02-11 10:43:11 +01:00
flask shorten output when ImportError due to app bug. 2017-03-21 15:22:15 -04:00
scripts Fix typos/grammar in docs (#2201) 2017-03-06 14:05:59 +01:00
tests Add test to showcase that printing a traceback works 2017-03-16 20:56:12 +01:00
.gitattributes Set merge strategy for CHANGES 2016-09-12 21:55:17 +03:00
.gitignore Adding coverage generation to tox (#2071) 2016-10-31 23:10:27 +01:00
.gitmodules use https instead of git protocol 2015-12-03 16:50:16 -08:00
.travis.yml Added python3.6 support for tests 2017-01-10 11:20:53 -06:00
AUTHORS Remove deprecation warnings for add_etags & mimetype guessing for send_file() 2016-06-03 14:52:33 +02:00
CHANGES Don't rely on X-Requested-With for pretty print json response (#2193) 2017-03-07 10:09:46 +09:00
CONTRIBUTING.rst Migrate various docs links to https (#2180) 2017-02-11 10:43:11 +01:00
LICENSE Happy New Year 2015 2015-01-02 11:35:00 +09:00
Makefile Use tox from make test 2016-11-02 17:56:59 +01:00
MANIFEST.in Update MANIFEST.in with simpler template commands 2016-02-19 08:23:28 -05:00
README py.test => pytest (#2173) 2017-02-09 18:34:16 +01:00
setup.cfg bdist_wheel replaces wheel (#2179) 2017-02-10 12:19:59 +01:00
setup.py Migrate various docs links to https (#2180) 2017-02-11 10:43:11 +01:00
test-requirements.txt Use tox from make test 2016-11-02 17:56:59 +01:00
tox.ini py.test => pytest (#2173) 2017-02-09 18:34:16 +01:00


                          // Flask //

              web development, one drop at a time


    ~ What is Flask?

      Flask is a microframework for Python based on Werkzeug
      and Jinja2.  It's intended for getting started very quickly
      and was developed with best intentions in mind.

    ~ Is it ready?

      It's still not 1.0 but it's shaping up nicely and is
      already widely used.  Consider the API to slightly
      improve over time but we don't plan on breaking it.

    ~ What do I need?

      All dependencies are installed by using `pip install Flask`.
      We encourage you to use a virtualenv. Check the docs for
      complete installation and usage instructions.

    ~ Where are the docs?

      Go to http://flask.pocoo.org/docs/ for a prebuilt version
      of the current documentation.  Otherwise build them yourself
      from the sphinx sources in the docs folder.

    ~ Where are the tests?

      Good that you're asking.  The tests are in the
      tests/ folder.  To run the tests use the
      `pytest` testing tool:

        $ pytest

      Details on contributing can be found in CONTRIBUTING.rst

    ~ Where can I get help?

      Either use the #pocoo IRC channel on irc.freenode.net or
      ask on the mailinglist: http://flask.pocoo.org/mailinglist/

      See http://flask.pocoo.org/community/ for more resources.