summaryrefslogtreecommitdiff
path: root/docs/_locale/ru_RU/LC_MESSAGES/tutorial_app.po
diff options
context:
space:
mode:
Diffstat (limited to 'docs/_locale/ru_RU/LC_MESSAGES/tutorial_app.po')
-rw-r--r--docs/_locale/ru_RU/LC_MESSAGES/tutorial_app.po359
1 files changed, 186 insertions, 173 deletions
diff --git a/docs/_locale/ru_RU/LC_MESSAGES/tutorial_app.po b/docs/_locale/ru_RU/LC_MESSAGES/tutorial_app.po
index 2b88aac..c4840b2 100644
--- a/docs/_locale/ru_RU/LC_MESSAGES/tutorial_app.po
+++ b/docs/_locale/ru_RU/LC_MESSAGES/tutorial_app.po
@@ -1,5 +1,5 @@
# SOME DESCRIPTIVE TITLE.
-# Copyright (C) 2009-2017, Marcel Hellkamp
+# Copyright (C) 2009-2020, Marcel Hellkamp
# This file is distributed under the same license as the Bottle package.
#
# Translators:
@@ -7,8 +7,8 @@ msgid ""
msgstr ""
"Project-Id-Version: bottle\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2015-12-19 14:15+0100\n"
-"PO-Revision-Date: 2015-12-13 21:08+0000\n"
+"POT-Creation-Date: 2020-12-31 18:35+0100\n"
+"PO-Revision-Date: 2020-12-31 17:35+0000\n"
"Last-Translator: defnull <marc@gsites.de>\n"
"Language-Team: Russian (Russia) (http://www.transifex.com/bottle/bottle/language/ru_RU/)\n"
"MIME-Version: 1.0\n"
@@ -17,17 +17,17 @@ msgstr ""
"Language: ru_RU\n"
"Plural-Forms: nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || (n%100>=11 && n%100<=14)? 2 : 3);\n"
-#: ../../tutorial_app.rst:20
+#: ../../tutorial_app.rst:19
msgid "Tutorial: Todo-List Application"
msgstr ""
-#: ../../tutorial_app.rst:24
+#: ../../tutorial_app.rst:23
msgid ""
-"This tutorial is a work in progess and written by `noisefloor "
+"This tutorial is a work in progress and written by `noisefloor "
"<http://github.com/noisefloor>`_."
msgstr ""
-#: ../../tutorial_app.rst:27
+#: ../../tutorial_app.rst:26
msgid ""
"This tutorial should give a brief introduction to the Bottle_ WSGI "
"Framework. The main goal is to be able, after reading through this tutorial,"
@@ -37,19 +37,19 @@ msgid ""
"POST parameters."
msgstr ""
-#: ../../tutorial_app.rst:29
+#: ../../tutorial_app.rst:28
msgid ""
"To understand the content here, it is not necessary to have a basic "
"knowledge of WSGI, as Bottle tries to keep WSGI away from the user anyway. "
"You should have a fair understanding of the Python_ programming language. "
"Furthermore, the example used in the tutorial retrieves and stores data in a"
-" SQL databse, so a basic idea about SQL helps, but is not a must to "
+" SQL database, so a basic idea about SQL helps, but is not a must to "
"understand the concepts of Bottle. Right here, SQLite_ is used. The output "
"of Bottle sent to the browser is formatted in some examples by the help of "
"HTML. Thus, a basic idea about the common HTML tags does help as well."
msgstr ""
-#: ../../tutorial_app.rst:31
+#: ../../tutorial_app.rst:30
msgid ""
"For the sake of introducing Bottle, the Python code \"in between\" is kept "
"short, in order to keep the focus. Also all code within the tutorial is "
@@ -58,15 +58,15 @@ msgid ""
"protect the database with a password, test and escape the input etc."
msgstr ""
-#: ../../tutorial_app.rst:0
+#: ../../tutorial_app.rst:32
msgid "Table of Contents"
msgstr ""
-#: ../../tutorial_app.rst:36
+#: ../../tutorial_app.rst:35
msgid "Goals"
msgstr ""
-#: ../../tutorial_app.rst:38
+#: ../../tutorial_app.rst:37
msgid ""
"At the end of this tutorial, we will have a simple, web-based ToDo list. The"
" list contains a text (with max 100 characters) and a status (0 for closed, "
@@ -74,68 +74,68 @@ msgid ""
"can be view and edited and new items can be added."
msgstr ""
-#: ../../tutorial_app.rst:40
+#: ../../tutorial_app.rst:39
msgid ""
"During development, all pages will be available on ``localhost`` only, but "
"later on it will be shown how to adapt the application for a \"real\" "
"server, including how to use with Apache's mod_wsgi."
msgstr ""
-#: ../../tutorial_app.rst:42
+#: ../../tutorial_app.rst:41
msgid ""
"Bottle will do the routing and format the output, with the help of "
"templates. The items of the list will be stored inside a SQLite database. "
"Reading and writing the database will be done by Python code."
msgstr ""
-#: ../../tutorial_app.rst:44
+#: ../../tutorial_app.rst:43
msgid ""
"We will end up with an application with the following pages and "
"functionality:"
msgstr ""
-#: ../../tutorial_app.rst:46
+#: ../../tutorial_app.rst:45
msgid "start page ``http://localhost:8080/todo``"
msgstr ""
-#: ../../tutorial_app.rst:47
+#: ../../tutorial_app.rst:46
msgid "adding new items to the list: ``http://localhost:8080/new``"
msgstr ""
-#: ../../tutorial_app.rst:48
+#: ../../tutorial_app.rst:47
msgid "page for editing items: ``http://localhost:8080/edit/<no:int>``"
msgstr ""
-#: ../../tutorial_app.rst:49
+#: ../../tutorial_app.rst:48
msgid "catching errors"
msgstr ""
-#: ../../tutorial_app.rst:52
+#: ../../tutorial_app.rst:51
msgid "Before We Start..."
msgstr ""
-#: ../../tutorial_app.rst:56
+#: ../../tutorial_app.rst:55
msgid "Install Bottle"
msgstr ""
-#: ../../tutorial_app.rst:57
+#: ../../tutorial_app.rst:56
msgid ""
"Assuming that you have a fairly new installation of Python (version 2.5 or "
"higher), you only need to install Bottle in addition to that. Bottle has no "
"other dependencies than Python itself."
msgstr ""
-#: ../../tutorial_app.rst:59
+#: ../../tutorial_app.rst:58
msgid ""
"You can either manually install Bottle or use Python's easy_install: "
"``easy_install bottle``"
msgstr ""
-#: ../../tutorial_app.rst:63
+#: ../../tutorial_app.rst:62
msgid "Further Software Necessities"
msgstr ""
-#: ../../tutorial_app.rst:64
+#: ../../tutorial_app.rst:63
msgid ""
"As we use SQLite3 as a database, make sure it is installed. On Linux "
"systems, most distributions have SQLite3 installed by default. SQLite is "
@@ -143,18 +143,18 @@ msgid ""
"of the python standard library."
msgstr ""
-#: ../../tutorial_app.rst:67
+#: ../../tutorial_app.rst:66
msgid "Create An SQL Database"
msgstr ""
-#: ../../tutorial_app.rst:68
+#: ../../tutorial_app.rst:67
msgid ""
"First, we need to create the database we use later on. To do so, save the "
"following script in your project directory and run it with python. You can "
"use the interactive interpreter too::"
msgstr ""
-#: ../../tutorial_app.rst:79
+#: ../../tutorial_app.rst:78
msgid ""
"This generates a database-file `todo.db` with tables called ``todo`` and "
"three columns ``id``, ``task``, and ``status``. ``id`` is a unique id for "
@@ -164,22 +164,22 @@ msgid ""
"closed (value 0)."
msgstr ""
-#: ../../tutorial_app.rst:82
+#: ../../tutorial_app.rst:81
msgid "Using Bottle for a Web-Based ToDo List"
msgstr ""
-#: ../../tutorial_app.rst:84
+#: ../../tutorial_app.rst:83
msgid ""
"Now it is time to introduce Bottle in order to create a web-based "
"application. But first, we need to look into a basic concept of Bottle: "
"routes."
msgstr ""
-#: ../../tutorial_app.rst:88
+#: ../../tutorial_app.rst:87
msgid "Understanding routes"
msgstr ""
-#: ../../tutorial_app.rst:89
+#: ../../tutorial_app.rst:88
msgid ""
"Basically, each page visible in the browser is dynamically generated when "
"the page address is called. Thus, there is no static content. That is "
@@ -190,24 +190,24 @@ msgid ""
"execute the corresponding Python code and return its result."
msgstr ""
-#: ../../tutorial_app.rst:93
+#: ../../tutorial_app.rst:92
msgid "First Step - Showing All Open Items"
msgstr ""
-#: ../../tutorial_app.rst:94
+#: ../../tutorial_app.rst:93
msgid ""
"So, after understanding the concept of routes, let's create the first one. "
"The goal is to see all open items from the ToDo list::"
msgstr ""
-#: ../../tutorial_app.rst:109
+#: ../../tutorial_app.rst:108
msgid ""
"Save the code a ``todo.py``, preferably in the same directory as the file "
"``todo.db``. Otherwise, you need to add the path to ``todo.db`` in the "
"``sqlite3.connect()`` statement."
msgstr ""
-#: ../../tutorial_app.rst:111
+#: ../../tutorial_app.rst:110
msgid ""
"Let's have a look what we just did: We imported the necessary module "
"``sqlite3`` to access to SQLite database and from Bottle we imported "
@@ -223,19 +223,19 @@ msgid ""
"``todo_list()``. That is how routing within bottle works."
msgstr ""
-#: ../../tutorial_app.rst:113
+#: ../../tutorial_app.rst:112
msgid ""
"Actually you can bind more than one route to a function. So the following "
"code::"
msgstr ""
-#: ../../tutorial_app.rst:120
+#: ../../tutorial_app.rst:119
msgid ""
"will work fine, too. What will not work is to bind one route to more than "
"one function."
msgstr ""
-#: ../../tutorial_app.rst:122
+#: ../../tutorial_app.rst:121
msgid ""
"What you will see in the browser is what is returned, thus the value given "
"by the ``return`` statement. In this example, we need to convert ``result`` "
@@ -244,7 +244,7 @@ msgid ""
"list of tuples, which is the standard defined by the `Python DB API`_."
msgstr ""
-#: ../../tutorial_app.rst:124
+#: ../../tutorial_app.rst:123
msgid ""
"Now, after understanding the little script above, it is time to execute it "
"and watch the result yourself. Remember that on Linux- / Unix-based systems "
@@ -254,7 +254,7 @@ msgid ""
"this::"
msgstr ""
-#: ../../tutorial_app.rst:128
+#: ../../tutorial_app.rst:127
msgid ""
"If so - congratulations! You are now a successful user of Bottle. In case it"
" did not work and you need to make some changes to the script, remember to "
@@ -262,23 +262,23 @@ msgid ""
"loaded."
msgstr ""
-#: ../../tutorial_app.rst:130
+#: ../../tutorial_app.rst:129
msgid ""
"Actually, the output is not really exciting nor nice to read. It is the raw "
"result returned from the SQL query."
msgstr ""
-#: ../../tutorial_app.rst:132
+#: ../../tutorial_app.rst:131
msgid ""
"So, in the next step we format the output in a nicer way. But before we do "
"that, we make our life easier."
msgstr ""
-#: ../../tutorial_app.rst:136
+#: ../../tutorial_app.rst:135
msgid "Debugging and Auto-Reload"
msgstr ""
-#: ../../tutorial_app.rst:137
+#: ../../tutorial_app.rst:136
msgid ""
"Maybe you already noticed that Bottle sends a short error message to the "
"browser in case something within the script is wrong, e.g. the connection to"
@@ -287,7 +287,7 @@ msgid ""
"statement to the script::"
msgstr ""
-#: ../../tutorial_app.rst:145
+#: ../../tutorial_app.rst:144
msgid ""
"By enabling \"debug\", you will get a full stacktrace of the Python "
"interpreter, which usually contains useful information for finding bugs. "
@@ -295,42 +295,42 @@ msgid ""
" will take effect without stopping the server."
msgstr ""
-#: ../../tutorial_app.rst:149
+#: ../../tutorial_app.rst:148
msgid ""
"That ``debug(True)`` is supposed to be used for development only, it should "
"*not* be used in production environments."
msgstr ""
-#: ../../tutorial_app.rst:153
+#: ../../tutorial_app.rst:152
msgid ""
"Another quite nice feature is auto-reloading, which is enabled by modifying "
"the ``run()`` statement to"
msgstr ""
-#: ../../tutorial_app.rst:159
+#: ../../tutorial_app.rst:158
msgid ""
"This will automatically detect changes to the script and reload the new "
"version once it is called again, without the need to stop and start the "
"server."
msgstr ""
-#: ../../tutorial_app.rst:161
+#: ../../tutorial_app.rst:160
msgid ""
"Again, the feature is mainly supposed to be used while developing, not on "
"production systems."
msgstr ""
-#: ../../tutorial_app.rst:165
+#: ../../tutorial_app.rst:164
msgid "Bottle Template To Format The Output"
msgstr ""
-#: ../../tutorial_app.rst:166
+#: ../../tutorial_app.rst:165
msgid ""
"Now let's have a look at casting the output of the script into a proper "
"format."
msgstr ""
-#: ../../tutorial_app.rst:168
+#: ../../tutorial_app.rst:167
msgid ""
"Actually Bottle expects to receive a string or a list of strings from a "
"function and returns them by the help of the built-in server to the browser."
@@ -338,7 +338,7 @@ msgid ""
" text formatted with HTML markup, too."
msgstr ""
-#: ../../tutorial_app.rst:170
+#: ../../tutorial_app.rst:169
msgid ""
"Bottle brings its own easy-to-use template engine with it. Templates are "
"stored as separate files having a ``.tpl`` extension. The template can be "
@@ -348,7 +348,7 @@ msgid ""
" query, which will be then formatted nicely within the template."
msgstr ""
-#: ../../tutorial_app.rst:172
+#: ../../tutorial_app.rst:171
msgid ""
"Right here, we are going to cast the result of our query showing the open "
"ToDo items into a simple table with two columns: the first column will "
@@ -356,11 +356,11 @@ msgid ""
"as seen above, a list of tuples, each tuple contains one set of results."
msgstr ""
-#: ../../tutorial_app.rst:174
+#: ../../tutorial_app.rst:173
msgid "To include the template in our example, just add the following lines::"
msgstr ""
-#: ../../tutorial_app.rst:184
+#: ../../tutorial_app.rst:183
msgid ""
"So we do here two things: first, we import ``template`` from Bottle in order"
" to be able to use templates. Second, we assign the output of the template "
@@ -371,7 +371,7 @@ msgid ""
"value to a template."
msgstr ""
-#: ../../tutorial_app.rst:186
+#: ../../tutorial_app.rst:185
msgid ""
"Templates always return a list of strings, thus there is no need to convert "
"anything. We can save one line of code by writing ``return "
@@ -379,18 +379,18 @@ msgid ""
"as above."
msgstr ""
-#: ../../tutorial_app.rst:188
+#: ../../tutorial_app.rst:187
msgid ""
"Now it is time to write the corresponding template, which looks like this::"
msgstr ""
-#: ../../tutorial_app.rst:202
+#: ../../tutorial_app.rst:201
msgid ""
"Save the code as ``make_table.tpl`` in the same directory where ``todo.py`` "
"is stored."
msgstr ""
-#: ../../tutorial_app.rst:204
+#: ../../tutorial_app.rst:203
msgid ""
"Let's have a look at the code: every line starting with % is interpreted as "
"Python code. Because it is effectively Python, only valid Python statements "
@@ -398,7 +398,7 @@ msgid ""
"code would. The other lines are plain HTML markup."
msgstr ""
-#: ../../tutorial_app.rst:206
+#: ../../tutorial_app.rst:205
msgid ""
"As you can see, we use Python's ``for`` statement two times, in order to go "
"through ``rows``. As seen above, ``rows`` is a variable which holds the "
@@ -409,14 +409,14 @@ msgid ""
" ``%end``, otherwise the output may not be what you expect."
msgstr ""
-#: ../../tutorial_app.rst:208
+#: ../../tutorial_app.rst:207
msgid ""
"If you need to access a variable within a non-Python code line inside the "
"template, you need to put it into double curly braces. This tells the "
"template to insert the actual value of the variable right in place."
msgstr ""
-#: ../../tutorial_app.rst:210
+#: ../../tutorial_app.rst:209
msgid ""
"Run the script again and look at the output. Still not really nice, but at "
"least more readable than the list of tuples. You can spice-up the very "
@@ -424,107 +424,97 @@ msgid ""
"looking output."
msgstr ""
-#: ../../tutorial_app.rst:214
+#: ../../tutorial_app.rst:213
msgid "Using GET and POST Values"
msgstr ""
-#: ../../tutorial_app.rst:215
+#: ../../tutorial_app.rst:214
msgid ""
"As we can review all open items properly, we move to the next step, which is"
" adding new items to the ToDo list. The new item should be received from a "
"regular HTML-based form, which sends its data by the GET method."
msgstr ""
-#: ../../tutorial_app.rst:217
+#: ../../tutorial_app.rst:216
msgid ""
"To do so, we first add a new route to our script and tell the route that it "
"should get GET data::"
msgstr ""
-#: ../../tutorial_app.rst:240
+#: ../../tutorial_app.rst:239
msgid ""
"To access GET (or POST) data, we need to import ``request`` from Bottle. To "
"assign the actual data to a variable, we use the statement "
-"``request.GET.get('task','').strip()`` statement, where ``task`` is the name"
-" of the GET data we want to access. That's all. If your GET data has more "
-"than one variable, multiple ``request.GET.get()`` statements can be used and"
-" assigned to other variables."
+"``request.GET.task.strip()`` statement, where ``task`` is the name of the "
+"GET data we want to access. That's all. If your GET data has more than one "
+"variable, multiple ``request.GET.get()`` statements can be used and assigned"
+" to other variables."
msgstr ""
-#: ../../tutorial_app.rst:242
+#: ../../tutorial_app.rst:241
msgid ""
"The rest of this piece of code is just processing of the gained data: "
"writing to the database, retrieve the corresponding id from the database and"
" generate the output."
msgstr ""
-#: ../../tutorial_app.rst:244
+#: ../../tutorial_app.rst:243
msgid ""
"But where do we get the GET data from? Well, we can use a static HTML page "
"holding the form. Or, what we do right now, is to use a template which is "
"output when the route ``/new`` is called without GET data."
msgstr ""
-#: ../../tutorial_app.rst:246
+#: ../../tutorial_app.rst:245
msgid "The code needs to be extended to::"
msgstr ""
-#: ../../tutorial_app.rst:269
+#: ../../tutorial_app.rst:268
msgid "``new_task.tpl`` looks like this::"
msgstr ""
-#: ../../tutorial_app.rst:277
+#: ../../tutorial_app.rst:276
msgid "That's all. As you can see, the template is plain HTML this time."
msgstr ""
-#: ../../tutorial_app.rst:279
+#: ../../tutorial_app.rst:278
msgid "Now we are able to extend our to do list."
msgstr ""
-#: ../../tutorial_app.rst:281
+#: ../../tutorial_app.rst:280
msgid ""
"By the way, if you prefer to use POST data: this works exactly the same way,"
" just use ``request.POST.get()`` instead."
msgstr ""
-#: ../../tutorial_app.rst:285
+#: ../../tutorial_app.rst:284
msgid "Editing Existing Items"
msgstr ""
-#: ../../tutorial_app.rst:286
+#: ../../tutorial_app.rst:285
msgid "The last point to do is to enable editing of existing items."
msgstr ""
-#: ../../tutorial_app.rst:288
+#: ../../tutorial_app.rst:287
msgid ""
"By using only the routes we know so far it is possible, but may be quite "
"tricky. But Bottle knows something called \"dynamic routes\", which makes "
"this task quite easy."
msgstr ""
-#: ../../tutorial_app.rst:290
+#: ../../tutorial_app.rst:289
msgid "The basic statement for a dynamic route looks like this::"
msgstr ""
-#: ../../tutorial_app.rst:294
+#: ../../tutorial_app.rst:293
msgid ""
-"The key point here is the colon. This tells Bottle to accept for "
-"``:something`` any string up to the next slash. Furthermore, the value of "
-"``something`` will be passed to the function assigned to that route, so the "
-"data can be processed within the function."
-msgstr ""
-
-#: ../../tutorial_app.rst:296
-msgid ""
-"For our ToDo list, we will create a route ``@route('/edit/<no:int>)``, where"
-" ``no`` is the id (integer) of the item to edit."
-msgstr ""
-
-#: ../../tutorial_app.rst:298
-msgid "The code looks like this::"
+"This tells Bottle to accept for ``<something>`` any string up to the next "
+"slash. Furthermore, the value of ``something`` will be passed to the "
+"function assigned to that route, so the data can be processed within the "
+"function, like this::"
msgstr ""
-#: ../../tutorial_app.rst:326
+#: ../../tutorial_app.rst:321
msgid ""
"It is basically pretty much the same what we already did above when adding "
"new items, like using ``GET`` data etc. The main addition here is using the "
@@ -533,34 +523,60 @@ msgid ""
" the function to access the right row of data within the database."
msgstr ""
-#: ../../tutorial_app.rst:328
+#: ../../tutorial_app.rst:324
msgid ""
"The template ``edit_task.tpl`` called within the function looks like this::"
msgstr ""
-#: ../../tutorial_app.rst:343
+#: ../../tutorial_app.rst:339
msgid ""
"Again, this template is a mix of Python statements and HTML, as already "
"explained above."
msgstr ""
-#: ../../tutorial_app.rst:345
+#: ../../tutorial_app.rst:341
msgid ""
"A last word on dynamic routes: you can even use a regular expression for a "
"dynamic route, as demonstrated later."
msgstr ""
+#: ../../tutorial_app.rst:345
+msgid "Validating Dynamic Routes"
+msgstr ""
+
+#: ../../tutorial_app.rst:346
+msgid ""
+"Using dynamic routes is fine, but for many cases it makes sense to validate "
+"the dynamic part of the route. For example, we expect an integer number in "
+"our route for editing above. But if a float, characters or so are received, "
+"the Python interpreter throws an exception, which is not what we want."
+msgstr ""
+
#: ../../tutorial_app.rst:348
+msgid ""
+"For those cases, Bottle offers the ``<name:int>`` wildcard filter, which "
+"matches (signed) digits and converts the value to integer. In order to apply"
+" the wildcard filter, extend the code as follows::"
+msgstr ""
+
+#: ../../tutorial_app.rst:356
+msgid ""
+"Save the code and call the page again using incorrect value for "
+"``<no:int>``, e.g. a float. You will receive not an exception, but a \"404 "
+"Not Found\" error."
+msgstr ""
+
+#: ../../tutorial_app.rst:360
msgid "Dynamic Routes Using Regular Expressions"
msgstr ""
-#: ../../tutorial_app.rst:349
+#: ../../tutorial_app.rst:361
msgid ""
"Bottle can also handle dynamic routes, where the \"dynamic part\" of the "
"route can be a regular expression."
msgstr ""
-#: ../../tutorial_app.rst:351
+#: ../../tutorial_app.rst:363
msgid ""
"So, just to demonstrate that, let's assume that all single items in our ToDo"
" list should be accessible by their plain number, by a term like e.g. "
@@ -569,31 +585,28 @@ msgid ""
"the route, the term \"item\" is static."
msgstr ""
-#: ../../tutorial_app.rst:353
+#: ../../tutorial_app.rst:365
msgid "As said above, the solution is a regular expression::"
msgstr ""
-#: ../../tutorial_app.rst:367
+#: ../../tutorial_app.rst:380
msgid ""
-"This example is somehow artificially constructed - it would be easier to use"
-" a plain dynamic route only combined with a validation. Nevertheless, we "
-"want to see how regular expression routes work: the line "
-"``@route(/item<item_:re:[0-9]+>)`` starts like a normal route, but the part "
-"surrounded by # is interpreted as a regular expression, which is the dynamic"
-" part of the route. So in this case, we want to match any digit between 0 "
-"and 9. The following function \"show_item\" just checks whether the given "
-"item is present in the database or not. In case it is present, the "
-"corresponding text of the task is returned. As you can see, only the regular"
-" expression part of the route is passed forward. Furthermore, it is always "
-"forwarded as a string, even if it is a plain integer number, like in this "
-"case."
+"The line ``@route(/item<item:re:[0-9]+>)`` starts like a normal route, but "
+"the third part of the wildcard is interpreted as a regular expression, which"
+" is the dynamic part of the route. So in this case, we want to match any "
+"digit between 0 and 9. The following function \"show_item\" just checks "
+"whether the given item is present in the database or not. In case it is "
+"present, the corresponding text of the task is returned. As you can see, "
+"only the regular expression part of the route is passed forward. "
+"Furthermore, it is always forwarded as a string, even if it is a plain "
+"integer number, like in this case."
msgstr ""
-#: ../../tutorial_app.rst:371
+#: ../../tutorial_app.rst:384
msgid "Returning Static Files"
msgstr ""
-#: ../../tutorial_app.rst:372
+#: ../../tutorial_app.rst:385
msgid ""
"Sometimes it may become necessary to associate a route not to a Python "
"function, but just return a static file. So if you have for example a help "
@@ -601,7 +614,7 @@ msgid ""
"This works as follows::"
msgstr ""
-#: ../../tutorial_app.rst:380
+#: ../../tutorial_app.rst:393
msgid ""
"At first, we need to import the ``static_file`` function from Bottle. As you"
" can see, the ``return static_file`` statement replaces the ``return`` "
@@ -614,11 +627,11 @@ msgid ""
"``static_file`` works with any type of route, including the dynamic ones."
msgstr ""
-#: ../../tutorial_app.rst:384
+#: ../../tutorial_app.rst:397
msgid "Returning JSON Data"
msgstr ""
-#: ../../tutorial_app.rst:385
+#: ../../tutorial_app.rst:398
msgid ""
"There may be cases where you do not want your application to generate the "
"output directly, but return data to be processed further on, e.g. by "
@@ -628,37 +641,37 @@ msgid ""
"languages, including Python"
msgstr ""
-#: ../../tutorial_app.rst:387
+#: ../../tutorial_app.rst:400
msgid ""
"So, let's assume we want to return the data generated in the regular "
"expression route example as a JSON object. The code looks like this::"
msgstr ""
-#: ../../tutorial_app.rst:402
+#: ../../tutorial_app.rst:415
msgid ""
"As you can, that is fairly simple: just return a regular Python dictionary "
"and Bottle will convert it automatically into a JSON object prior to "
"sending. So if you e.g. call \"http://localhost/json1\" Bottle should in "
-"this case return the JSON object ``{\"Task\": [\"Read A-byte-of-python to "
+"this case return the JSON object ``{\"task\": [\"Read A-byte-of-python to "
"get a good introduction into Python\"]}``."
msgstr ""
-#: ../../tutorial_app.rst:407
+#: ../../tutorial_app.rst:420
msgid "Catching Errors"
msgstr ""
-#: ../../tutorial_app.rst:408
+#: ../../tutorial_app.rst:421
msgid ""
"The next step may is to catch the error with Bottle itself, to keep away any"
" type of error message from the user of your application. To do that, Bottle"
" has an \"error-route\", which can be a assigned to a HTML-error."
msgstr ""
-#: ../../tutorial_app.rst:410
+#: ../../tutorial_app.rst:423
msgid "In our case, we want to catch a 403 error. The code is as follows::"
msgstr ""
-#: ../../tutorial_app.rst:418
+#: ../../tutorial_app.rst:431
msgid ""
"So, at first we need to import ``error`` from Bottle and define a route by "
"``error(403)``, which catches all \"403 forbidden\" errors. The function "
@@ -667,28 +680,28 @@ msgid ""
"function always needs to accept one argument, otherwise it will not work."
msgstr ""
-#: ../../tutorial_app.rst:420
+#: ../../tutorial_app.rst:433
msgid ""
"Again, you can assign more than one error-route to a function, or catch "
"various errors with one function each. So this code::"
msgstr ""
-#: ../../tutorial_app.rst:427
+#: ../../tutorial_app.rst:440
msgid "works fine, the following one as well::"
msgstr ""
-#: ../../tutorial_app.rst:439
+#: ../../tutorial_app.rst:452
msgid "Summary"
msgstr ""
-#: ../../tutorial_app.rst:440
+#: ../../tutorial_app.rst:453
msgid ""
"After going through all the sections above, you should have a brief "
"understanding how the Bottle WSGI framework works. Furthermore you have all "
"the knowledge necessary to use Bottle for your applications."
msgstr ""
-#: ../../tutorial_app.rst:442
+#: ../../tutorial_app.rst:455
msgid ""
"The following chapter give a short introduction how to adapt Bottle for "
"larger projects. Furthermore, we will show how to operate Bottle with web "
@@ -696,11 +709,11 @@ msgid ""
"one we used so far."
msgstr ""
-#: ../../tutorial_app.rst:445
+#: ../../tutorial_app.rst:458
msgid "Server Setup"
msgstr ""
-#: ../../tutorial_app.rst:447
+#: ../../tutorial_app.rst:460
msgid ""
"So far, we used the standard server used by Bottle, which is the `WSGI "
"reference Server`_ shipped along with Python. Although this server is "
@@ -709,47 +722,47 @@ msgid ""
"have a look how to tweak the settings of the standard server first."
msgstr ""
-#: ../../tutorial_app.rst:451
+#: ../../tutorial_app.rst:464
msgid "Running Bottle on a different port and IP"
msgstr ""
-#: ../../tutorial_app.rst:452
+#: ../../tutorial_app.rst:465
msgid ""
-"As standard, Bottle serves the pages on the IP adress 127.0.0.1, also known "
-"as ``localhost``, and on port ``8080``. To modify the setting is pretty "
+"As standard, Bottle serves the pages on the IP address 127.0.0.1, also known"
+" as ``localhost``, and on port ``8080``. To modify the setting is pretty "
"simple, as additional parameters can be passed to Bottle's ``run()`` "
"function to change the port and the address."
msgstr ""
-#: ../../tutorial_app.rst:454
+#: ../../tutorial_app.rst:467
msgid ""
"To change the port, just add ``port=portnumber`` to the run command. So, for"
" example::"
msgstr ""
-#: ../../tutorial_app.rst:458
+#: ../../tutorial_app.rst:471
msgid "would make Bottle listen to port 80."
msgstr ""
-#: ../../tutorial_app.rst:460
+#: ../../tutorial_app.rst:473
msgid "To change the IP address where Bottle is listening::"
msgstr ""
-#: ../../tutorial_app.rst:464
+#: ../../tutorial_app.rst:477
msgid "If needed, both parameters can be combined, like::"
msgstr ""
-#: ../../tutorial_app.rst:468
+#: ../../tutorial_app.rst:481
msgid ""
"The ``port`` and ``host`` parameter can also be applied when Bottle is "
"running with a different server, as shown in the following section."
msgstr ""
-#: ../../tutorial_app.rst:472
+#: ../../tutorial_app.rst:485
msgid "Running Bottle with a different server"
msgstr ""
-#: ../../tutorial_app.rst:473
+#: ../../tutorial_app.rst:486
msgid ""
"As said above, the standard server is perfectly suitable for development, "
"personal use or a small group of people only using your application based on"
@@ -757,50 +770,50 @@ msgid ""
"it is single-threaded, thus it can only serve one request at a time."
msgstr ""
-#: ../../tutorial_app.rst:475
+#: ../../tutorial_app.rst:488
msgid ""
"But Bottle has already various adapters to multi-threaded servers on board, "
-"which perform better on higher load. Bottle supports Cherrypy_, Fapws3_, "
-"Flup_ and Paste_."
+"which perform better on higher load. Bottle supports Cherrypy_, Flup_ and "
+"Paste_."
msgstr ""
-#: ../../tutorial_app.rst:477
+#: ../../tutorial_app.rst:490
msgid ""
"If you want to run for example Bottle with the Paste server, use the "
"following code::"
msgstr ""
-#: ../../tutorial_app.rst:483
+#: ../../tutorial_app.rst:496
msgid ""
"This works exactly the same way with ``FlupServer``, ``CherryPyServer`` and "
"``FapwsServer``."
msgstr ""
-#: ../../tutorial_app.rst:487
+#: ../../tutorial_app.rst:500
msgid "Running Bottle on Apache with mod_wsgi"
msgstr ""
-#: ../../tutorial_app.rst:488
+#: ../../tutorial_app.rst:501
msgid ""
"Maybe you already have an Apache_ or you want to run a Bottle-based "
"application large scale - then it is time to think about Apache with "
"mod_wsgi_."
msgstr ""
-#: ../../tutorial_app.rst:490
+#: ../../tutorial_app.rst:503
msgid ""
"We assume that your Apache server is up and running and mod_wsgi is working "
"fine as well. On a lot of Linux distributions, mod_wsgi can be easily "
"installed via whatever package management system is in use."
msgstr ""
-#: ../../tutorial_app.rst:492
+#: ../../tutorial_app.rst:505
msgid ""
"Bottle brings an adapter for mod_wsgi with it, so serving your application "
"is an easy task."
msgstr ""
-#: ../../tutorial_app.rst:494
+#: ../../tutorial_app.rst:507
msgid ""
"In the following example, we assume that you want to make your application "
"\"ToDo list\" accessible through ``http://www.mypage.com/todo`` and your "
@@ -808,42 +821,42 @@ msgid ""
"``/var/www/todo``."
msgstr ""
-#: ../../tutorial_app.rst:496
+#: ../../tutorial_app.rst:509
msgid ""
"When you run your application via mod_wsgi, it is imperative to remove the "
"``run()`` statement from your code, otherwise it won't work here."
msgstr ""
-#: ../../tutorial_app.rst:498
+#: ../../tutorial_app.rst:511
msgid ""
"After that, create a file called ``adapter.wsgi`` with the following "
"content::"
msgstr ""
-#: ../../tutorial_app.rst:509
+#: ../../tutorial_app.rst:522
msgid ""
"and save it in the same path, ``/var/www/todo``. Actually the name of the "
"file can be anything, as long as the extension is ``.wsgi``. The name is "
"only used to reference the file from your virtual host."
msgstr ""
-#: ../../tutorial_app.rst:511
+#: ../../tutorial_app.rst:524
msgid ""
"Finally, we need to add a virtual host to the Apache configuration, which "
"looks like this::"
msgstr ""
-#: ../../tutorial_app.rst:527
+#: ../../tutorial_app.rst:540
msgid ""
"After restarting the server, your ToDo list should be accessible at "
"``http://www.mypage.com/todo``"
msgstr ""
-#: ../../tutorial_app.rst:530
+#: ../../tutorial_app.rst:543
msgid "Final Words"
msgstr ""
-#: ../../tutorial_app.rst:532
+#: ../../tutorial_app.rst:545
msgid ""
"Now we are at the end of this introduction and tutorial to Bottle. We "
"learned about the basic concepts of Bottle and wrote a first application "
@@ -851,7 +864,7 @@ msgid ""
"for large tasks and serve Bottle through an Apache web server with mod_wsgi."
msgstr ""
-#: ../../tutorial_app.rst:534
+#: ../../tutorial_app.rst:547
msgid ""
"As said in the introduction, this tutorial is not showing all shades and "
"possibilities of Bottle. What we skipped here is e.g. receiving file objects"
@@ -861,28 +874,28 @@ msgid ""
"documentation`_ ."
msgstr ""
-#: ../../tutorial_app.rst:537
+#: ../../tutorial_app.rst:550
msgid "Complete Example Listing"
msgstr ""
-#: ../../tutorial_app.rst:539
+#: ../../tutorial_app.rst:552
msgid ""
"As the ToDo list example was developed piece by piece, here is the complete "
"listing:"
msgstr ""
-#: ../../tutorial_app.rst:541
+#: ../../tutorial_app.rst:554
msgid "Main code for the application ``todo.py``::"
msgstr ""
-#: ../../tutorial_app.rst:655
+#: ../../tutorial_app.rst:675
msgid "Template ``make_table.tpl``::"
msgstr ""
-#: ../../tutorial_app.rst:669
+#: ../../tutorial_app.rst:689
msgid "Template ``edit_task.tpl``::"
msgstr ""
-#: ../../tutorial_app.rst:684
+#: ../../tutorial_app.rst:704
msgid "Template ``new_task.tpl``::"
msgstr ""