From 97b5605d84b4109f067fef34917b2ffe4ae8eae8 Mon Sep 17 00:00:00 2001 From: ramnes Date: Sat, 8 Feb 2014 02:46:01 +0000 Subject: [PATCH] Consistency between README and website (doc/index.rst), plus year is now 2014 --- LICENSE | 2 +- README.rst | 67 +++++++++++++++++++++++++++++++++++--------------- bottle.py | 2 +- docs/index.rst | 4 +-- 4 files changed, 50 insertions(+), 25 deletions(-) diff --git a/LICENSE b/LICENSE index cdd0c7060..5f3e8de3a 100644 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2012, Marcel Hellkamp. +Copyright (c) 2014, Marcel Hellkamp. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.rst b/README.rst index f475ffe98..9e4b5e97c 100644 --- a/README.rst +++ b/README.rst @@ -1,34 +1,61 @@ -Bottle Web Framework -==================== - .. image:: http://bottlepy.org/docs/dev/_static/logo_nav.png :alt: Bottle Logo :align: right -Bottle is a fast and simple micro-framework for small web applications. It -offers request dispatching (URL routing) with URL parameter support, templates, -a built-in HTTP Server and adapters for many third party WSGI/HTTP-server and -template engines - all in a single file and with no dependencies other than the -Python Standard Library. +.. _mako: http://www.makotemplates.org/ +.. _cheetah: http://www.cheetahtemplate.org/ +.. _jinja2: http://jinja.pocoo.org/ +.. _paste: http://pythonpaste.org/ +.. _fapws3: https://github.com/william-os4y/fapws3 +.. _bjoern: https://github.com/jonashaag/bjoern +.. _cherrypy: http://www.cherrypy.org/ +.. _WSGI: http://www.wsgi.org/ +.. _Python: http://python.org/ -Homepage and documentation: http://bottlepy.org/ -License: MIT (see LICENSE) +============================ +Bottle: Python Web Framework +============================ -Installation and Dependencies ------------------------------ +Bottle is a fast, simple and lightweight WSGI_ micro web-framework for Python_. It is distributed as a single file module and has no dependencies other than the `Python Standard Library `_. -Install bottle with ``pip install bottle`` or just `download bottle.py `_ and place it in your project directory. There are no (hard) dependencies other than the Python Standard Library. +* **Routing:** Requests to function-call mapping with support for clean and dynamic URLs. +* **Templates:** Fast and pythonic `*built-in template engine* `_ and support for mako_, jinja2_ and cheetah_ templates. +* **Utilities:** Convenient access to form data, file uploads, cookies, headers and other HTTP-related metadata. +* **Server:** Built-in HTTP development server and support for paste_, fapws3_, bjoern_, `Google App Engine `_, cherrypy_ or any other WSGI_ capable HTTP server. -Example -------- +Homepage and documentation: http://bottlepy.org + + +Example: "Hello World" in a bottle +---------------------------------- .. code-block:: python - from bottle import route, run + from bottle import route, run, template + + @route('/hello/') + def index(name): + return template('Hello {{name}}!', name=name) + + run(host='localhost', port=8080) + +Run this script or paste it into a Python console, then point your browser to ``_. That's it. + + +Download and Install +-------------------- + +.. __: https://github.com/defnull/bottle/raw/master/bottle.py + +Install the latest stable release with ``pip install bottle``, ``easy_install -U bottle`` or download `bottle.py`__ (unstable) into your project directory. There are no hard dependencies other than the Python standard library. Bottle runs with **Python 2.5+ and 3.x**. + + +License +------- + +.. __: https://github.com/defnull/bottle/raw/master/LICENSE - @route('/hello/') - def hello(name): - return '

Hello %s!

' % name.title() +Code and documentation are available according to the MIT License (see LICENSE__). - run(host='localhost', port=8080) +The Bottle logo however is *NOT* covered by that license. It is allowed to use the logo as a link to the bottle homepage or in direct context with the unmodified library. In all other cases please ask first. diff --git a/bottle.py b/bottle.py index d225c0da2..4da3557f2 100644 --- a/bottle.py +++ b/bottle.py @@ -9,7 +9,7 @@ Homepage and documentation: http://bottlepy.org/ -Copyright (c) 2013, Marcel Hellkamp. +Copyright (c) 2014, Marcel Hellkamp. License: MIT (see LICENSE for details) """ diff --git a/docs/index.rst b/docs/index.rst index e3b8dc924..52e3959b6 100755 --- a/docs/index.rst +++ b/docs/index.rst @@ -43,11 +43,9 @@ Run this script or paste it into a Python console, then point your browser to `< .. rubric:: Download and Install -.. _download: - .. __: https://github.com/defnull/bottle/raw/master/bottle.py -Install the latest stable release via PyPI_ (``easy_install -U bottle``) or download `bottle.py`__ (unstable) into your project directory. There are no hard [1]_ dependencies other than the Python standard library. Bottle runs with **Python 2.5+ and 3.x**. +Install the latest stable release with ``pip install bottle``, ``easy_install -U bottle`` or download `bottle.py`__ (unstable) into your project directory. There are no hard [1]_ dependencies other than the Python standard library. Bottle runs with **Python 2.5+ and 3.x**. User's Guide ===============