From 515f25a3074debc46bfb91d9b1652750d6672b98 Mon Sep 17 00:00:00 2001 From: nattheriddle1 <69092489+nattheriddle1@users.noreply.github.com> Date: Mon, 25 Jul 2022 11:21:55 -0500 Subject: [PATCH 01/13] Replace links before headings to headings with IDs Before, empty anchor tags with name attributes were placed before headings, so other anchor tags could target and automatically scroll to the heading when clicked. However, this functionality can and should be implemented by giving the headings ID attributes instead. This is more concise, easier to maintain, and a more proper use of HTML5. --- docs/0.3/form.fr.md | 15 ++++------- docs/0.3/templetor.fr.md | 51 ++++++++++++----------------------- docs/0.3/templetor.md | 54 +++++++++++++------------------------ docs/0.3/templetor.zh-cn.md | 18 +++++-------- docs/0.3/tutorial.fr.md | 39 +++++++++------------------ docs/0.3/tutorial.id.md | 24 ++++++----------- docs/0.3/tutorial.md | 24 ++++++----------- docs/0.3/tutorial.zh-cn.md | 24 ++++++----------- docs/0.3/upgrade.md | 12 +++------ ideas.md | 39 +++++++++------------------ install.es.md | 40 +++++++++------------------ install.fr.md | 39 +++++++++------------------ install.md | 40 +++++++++------------------ install.zh-cn.md | 39 +++++++++------------------ recommended_setup.fr.md | 15 ++++------- 15 files changed, 157 insertions(+), 316 deletions(-) diff --git a/docs/0.3/form.fr.md b/docs/0.3/form.fr.md index aea94507..e93ad488 100644 --- a/docs/0.3/form.fr.md +++ b/docs/0.3/form.fr.md @@ -15,8 +15,7 @@ Autres langues : [English](/form) | ... * Particularités des formulaires * Exemple - -## Introduction +

Introduction

Le module de formulaire de web.py permet de générer des formulaires HTML, de récuperer les entrées des utilisateurs, et les valider avant de les traiter ou les ajouter à une base de donnée. @@ -64,8 +63,7 @@ Ce qui donnera: - -## Caracteristiques des entrées formulaires +

Caracteristiques des entrées formulaires

Les entrées formulaires offrent quelques attributs additionnels. Par exemple : @@ -87,15 +85,13 @@ En plus des attributs ci-dessus, tous les attributs HTML peuvent être entré de maxlength="12" ) ) - -##Listes déroulantes (Dropdown) +

Listes déroulantes (Dropdown)

Les entrées des listes déroulantes permettent une description et une valeur uniques de chaque élément dans la liste déroulante. Pour ce faire, créez la liste déroulante avec les tuples comme ceci: form.Dropdown('mydrop', [('value1', 'description1'), ('value2', 'description2')]) - -## Particularités des formulaires +

Particularités des formulaires

En plus des champs de saisie individuels, form.py permet une complète validation de formulaire qui autorise la comparaison des champs. Les validations sont passées sous forme de liste dans une variable 'validators'. Par exemple : signup = form.Form( @@ -115,8 +111,7 @@ Une fois les données du formulaire postées, elles peuvent facilement être mis else: render.foo(f) - -## Exemple +

Exemple

import web from web import form diff --git a/docs/0.3/templetor.fr.md b/docs/0.3/templetor.fr.md index 48842731..05d44988 100644 --- a/docs/0.3/templetor.fr.md +++ b/docs/0.3/templetor.fr.md @@ -28,8 +28,7 @@ Autre langues : [English](/docs/0.3/templetor) | ... * Mise à jour depuis le gabarit web.py 0.2 - -# Introduction +

Introduction

Le langage de gabarit de web.py, appelé 'Templator', est conçu pour apporter la puissance de python aux modèles de gabarits. Au lieu d'inventer une nouvelle syntaxe pour les gabarits, il réutilise la syntaxe de python. @@ -46,8 +45,7 @@ Voici un gabarit tout simple: La première ligne indique que le gabarit est défini avec un argument appelé 'name'. `$name` dans la seconde ligne sera remplacé par la valeur de name lorsque le template sera rendu. - -# Utiliser un modèle de gabarit +

Utiliser un modèle de gabarit

La façon la plus imple d'utiliser le rendu de gabarits est celle-ci : @@ -68,11 +66,9 @@ Ou encore à partir d'une chaîne de caractères: hello = web.template.Template(template) print hello('world') - -# Syntaxe +

Syntaxe

- -## Substitution d'expression +

Substitution d'expression

Le caractère spécial '$' est utilisé pour spécifier des expressions python. Les expressions peuvent être jointent dans '()' ou '{}' pour un regroupement explicite. @@ -81,8 +77,7 @@ Le caractère spécial '$' est utilisé pour spécifier des expressions python. Gawk, a $dictionary[key].function('argument'). Cool, a $(limit)ing. - -## Attribution +

Attribution

Vous aurez parfois besoin de définir de nouvelles variables et de réattribuer certaines d'entre elles. @@ -94,8 +89,7 @@ Vous aurez parfois besoin de définir de nouvelles variables et de réattribuer Notez l'espace après '$' dans l'attribution. Il est requis pour différencier l'attribution à la substitution d'expression. - -## Filtrage +

Filtrage

Par defaut, Templator utilise le filtre 'web.websafe' pour encoder le HTML. @@ -107,8 +101,7 @@ Pour désactiver le filtre, utilisez ':' après '$'. Par exemple: Ce qui suit ne sera pas remplacé par une chaîne HTML ("&" par "&" par exemple). $:form.render() - -## Suppression d'un retour à la ligne +

Suppression d'un retour à la ligne

Un retour à la ligne peut-être supprimé en ajoutant l'anti-slash '\' à la fin de la ligne. @@ -117,23 +110,20 @@ Un retour à la ligne peut-être supprimé en ajoutant l'anti-slash '\' à la fi (comme ceci) \ alors il n'y aura pas de retour à la ligne. - -## Caractère d'échappement '$' +

Caractère d'échappement '$'

Utilisez `$$` pour avoir `$` (signe dollars) à l'affichage. Can you lend me $$50? - -## Commentaires +

Commentaires

'$#' est utilisé comme indicateur de commentaires. Tout ce qui commence par '$#' jusqu'à la fin de la ligne sera ignoré. $# Ceci est un commentaire Hello $name.title()! $# Affiche le nom comme titre - -## Structures de contrôles +

Structures de contrôles

Le système de gabarit accepte les instructions `for`, `while`, `if`, `elif` et `else`. Tout comme en Python, le corps de la déclaration est indenté. @@ -172,11 +162,9 @@ Parfois, celles-ci peuvent être très pratique. - -## Autres déclarations +

Autres déclarations

- -### $def +

$def

Vous pouvez définir une nouvelle fonction de gabarit en utilisant `$def`. les arguments-clés sont aussi supportés. @@ -203,8 +191,7 @@ Autre exemple $ data = [['a', 'b', 'c'], [1, 2, 3], [2, 4, 6], [3, 6, 9] ] $:table([tr(d) for d in data]) - -### $code +

$code

Du code python arbitraire peut être écrit en utilisant le bloc '$code'. @@ -224,8 +211,7 @@ Du code python arbitraire peut être écrit en utilisant le bloc '$code'. Les variables définies dans le bloc '$code' peuvent être utilisées ici. Par exemple, $limit(x) - -### $var +

$var

Le bloc '$var' peut être utilisé pour définir des propriétés additionnelles dans les résultats du gabarit. @@ -248,8 +234,7 @@ Les résultat du modèle ci-dessus peuvent être utilisés comme suit: >>> str(out) '\n\n
\nhello world\n
\n' - -# Objets internes et variables globales +

Objets internes et variables globales

Comme toutes fonctions python, le gabarit peut également accèder aux objets internes avec ses arguments et ses variables locales. Quelques fonctions internes communes telles que 'range', 'max', 'min', etc... et les valeurs booléennes 'True' et 'False' sont accessibles à tous les gabarits. @@ -269,8 +254,7 @@ Les objets internes qui sont exposés dans les gabarits peuvent aussi être cont # disable all builtins render = web.template.render('templates', builtins={}) - -# Securité +

Securité

L'un des objectifs de conception de Templetor est de permettre à des utilisateurs non épprouvés d'écrire des gabarits. @@ -282,8 +266,7 @@ Pour rendre l'exécution du gabarit sûre, ce qui suit n'est pas autorisé dans `SecurityException` est déclenchée si votre modèle utilise l'une de celles-ci. - -# Mise à jour depuis le gabarit web.py 0.2 +

Mise à jour depuis le gabarit web.py 0.2

La nouvelle implémentation est totalement compatible avec la mise en œuvre plus haut. Cependant, certains cas pourraient ne pas fonctionner pour les raisons suivantes: diff --git a/docs/0.3/templetor.md b/docs/0.3/templetor.md index aad1891c..3176c7c4 100644 --- a/docs/0.3/templetor.md +++ b/docs/0.3/templetor.md @@ -29,8 +29,7 @@ Other languages : [français](/docs/0.3/templetor.fr) | ... * Errors you may experience - -# Introduction +

Introduction

The web.py template language, called `Templetor` is designed to bring the power of Python to templates. Instead of inventing new syntax for templates, it re-uses python syntax. @@ -47,8 +46,7 @@ The first line says that the template is defined with one argument called `name` `$name` in the second line will be replaced with the value of name when the template is rendered. - -# Using the template system +

Using the template system

The most common way of rendering templates is this: @@ -69,11 +67,9 @@ And if you have the template as a string: hello = web.template.Template(template) print hello('world') - -# Syntax +

Syntax

- -## Expression Substitution +

Expression Substitution

Special character `$` is used to specify python expressions. Expression can be enclosed in `()` or `{}` for explicit grouping. @@ -82,8 +78,7 @@ Special character `$` is used to specify python expressions. Expression can be e Gawk, a $dictionary[key].function('argument'). Cool, a $(limit)ing. - -## Assignments +

Assignments

Sometimes you may want to define new variables and re-assign some variables. @@ -95,8 +90,7 @@ Sometimes you may want to define new variables and re-assign some variables. Notice the space after `$` in the assignment. It is required to differentiate assignment from expression substitution. - -## Filtering +

Filtering

By default, Templetor uses `web.websafe` filter to do HTML-encoding. @@ -108,8 +102,7 @@ To turnoff filter use `:` after `$`. For example: The following will not be html escaped. $:form.render() - -## Newline suppression +

Newline suppression

Newline can be suppressed by adding `\` character at the end of line. @@ -118,23 +111,20 @@ Newline can be suppressed by adding `\` character at the end of line. (like these) \ then there will be no newline. - -## Escaping $ +

Escaping $

Use `$$` to get `$` in the output. Can you lend me $$50? - -## Comments +

Comments

`$#` is used as comment indicator. Anything starting with $# till end of the line is ignored. $# this is a comment Hello $name.title()! $# display the name in title case - -## Control Structures +

Control Structures

The template system supports `for`, `while`, `if`, `elif` and `else`. Just like in python, body of the statement is indented. @@ -173,11 +163,9 @@ Sometimes these can be very handy. - -## Other Statements +

Other Statements

- -### def +

def

You can define a new template function using `$def`. Keyword arguments are also supported. @@ -204,8 +192,7 @@ Another example: $ data = [['a', 'b', 'c'], [1, 2, 3], [2, 4, 6], [3, 6, 9] ] $:table([tr(d) for d in data]) - -### code +

code

Arbitrary python code can be written using the `code` block. @@ -225,8 +212,7 @@ Arbitrary python code can be written using the `code` block. The variables defined in the code block can be used here. For example, $limit(x) - -### var +

var

The `var` block can be used to define additional properties in the template result. @@ -249,8 +235,7 @@ The result of the above template can be used as follows: >>> str(out) '\n\n
\nhello world\n
\n' - -# builtins and globals +

builtins and globals

Just like any Python function, template can also access builtins along with its arguments and local variables. Some common builtin functions like `range`, `min`, `max` etc. and boolean values `True` and `False` are made available to all the templates. @@ -269,8 +254,7 @@ Builtins that are exposed in the templates can be controlled too. # disable all builtins render = web.template.render('templates', builtins={}) - -# Security +

Security

One of the design goals of Templetor is to allow untrusted users to write templates. @@ -282,8 +266,7 @@ To make the template execution safe, the following are not allowed in the templa `SecurityException` is raised if your template uses any of these. - -# Upgrading from web.py 0.2 templates +

Upgrading from web.py 0.2 templates

The new implementation is mostly compatible with the earlier implementation. However some cases might not work because of the following reasons. @@ -297,8 +280,7 @@ The following are still supported but not preferred. * Using `\$` for escaping dollar. Use `$$` instead. * Modifying `web.template.Template.globals`. pass globals to `web.template.render` as argument instead. - -# Errors you may experience +

Errors you may experience

If your error isn't mentioned here, feel free to report it by creating an issue with sample code used to reproduce it: diff --git a/docs/0.3/templetor.zh-cn.md b/docs/0.3/templetor.zh-cn.md index 2fe3a6ee..7a61e5b9 100644 --- a/docs/0.3/templetor.zh-cn.md +++ b/docs/0.3/templetor.zh-cn.md @@ -5,8 +5,7 @@ title: Templetor web.py 模板系统 # Templetor: web.py 模板系统 - -# Introduction +

Introduction

- web.py 的模板语言叫做 `Templetor`,它能负责将 python 的强大功能传递给模板系统。 在模板中没有重新设计语法,它是类 python 的。 如果你会 python,你可以顺手拈来。 diff --git a/docs/0.3/todo.fr.md b/docs/0.3/todo.fr.md index 766fecdf..8694e596 100644 --- a/docs/0.3/todo.fr.md +++ b/docs/0.3/todo.fr.md @@ -26,7 +26,6 @@ Ici sera réunie la liste des travaux à réaliser et ceux en cours de réalisat ## Documentation de web.py 0.3 - ### Exemples de code * [Code samples](https://github.com/webpy/webpy-examples/). - traduction demandée @@ -40,7 +39,6 @@ Ici sera réunie la liste des travaux à réaliser et ceux en cours de réalisat ### API Documentation * [API documentation](/docs/0.3/api) - traduction demandée - ## Cookbook ### Avancé diff --git a/docs/0.3/tutorial.fr.md b/docs/0.3/tutorial.fr.md index c5627dcf..4d96e72f 100644 --- a/docs/0.3/tutorial.fr.md +++ b/docs/0.3/tutorial.fr.md @@ -9,7 +9,6 @@ Autre langages : [english](./tutorial) | [chinese](./tutorial.zh-cn) # Sommaire - * [Prérequis](#introduction) * [Manipuler les URLs](#manipurl) * [Gérer les URLs](#gereurl) @@ -26,18 +25,14 @@ Autre langages : [english](./tutorial) | [chinese](./tutorial.zh-cn)

Prérequis

- - Vous connaissez Python et vous désirez construire un site web. Webpy vous permettra de le faire facilement. Si vous décidez de suivre l'ensemble de ce tutorial, vous aurez besoin d'installer Python, [web.py] (/install/fr) , flup, psycopg2 et Postgres (ou une base de donnée equivalente et les pilotes python). Pour plus de détails, veuillez consulter [webpy.org](http://webpy.org/) Si vous possédez déjà un projet web.py existant, jetez un oeil à la page de [mise à jour](http://webpy.org/docs/0.3/upgrade) pour plus d'informations sur la migration. - # Commençons -

Manipuler les URLs

La partie la plus importante de n'importe quel site web est la structure des URLs. Les URLs ne sont pas que des liens que vos visiteurs voient et envoient par mails à leurs amis, elles fournissent aussi un modèle mental sur la façon avec laquel un site web fonctionne. Sur des sites populaires tels que del.icio.us, les URLs font partie même de l'interface utilisateur. Web.py rend la création d'URLs facile. @@ -73,7 +68,6 @@ Alors que la plupart des gens ne le remarquent pas en naviguant simplement, votr GET est celle que nous connaissons tous, celle qui sert à demander le texte d'une page web. Lorsque vous tapez 'harvard.edu' dans votre navigateur, cela demande littéralement au serveur web de Harvard de fournir /. La seconde fonction très célèbre, POST, est souvent utilisée lorsque vous utilisez certains types de formulaires, comme une demande d'achat d'un produit. Vous utilisez POST chaque fois que vous soumettez une demande (comme le débit de votre carte de crédit et le traitement d'une commande). Cela est essentiel, parce que GET URLs peut être transmis et indexé par les moteurs de recherche, que vous voulez certainement pour la plupart de vos pages, mais ne désirez certainement pas pour des choses comme le traitement des ordres (imaginez si Google essaye de tout acheter sur votre site!) -

Page index - ma première classe

Dans notre code web.py, nous faisons la distinction entre les deux clairement. Maintenant, il est nécessaire d'écrire la Classe 'index'. @@ -110,8 +104,6 @@ Note: Vous pouvez spécifier le numéro de port à utiliser dans la ligne de com $ python code.py 1234 - -

Modèles, gabarits

Ecrire du HTML à l'intérieur de python peut être lourd et pesant. C'est bien plus amusant d'écrire du Python à l'intérieur du HTML. Par bonheur, web.py le fait très facilement. @@ -260,11 +252,9 @@ Note: Afin d'accéder aux données à partir de plusieurs éléments identiqueme Quelques notes additionnelles: `db.update` fonctionne comme `db.insert` excepté qu'au lieu de renvoyer l'ID, il doit recevoir en argument, après le nom de la table, soit l'ID soit une clause `WHERE` permettant d'identifier la ligne à modifier. - db.update('todo', where="id = 10", title = "web.py pour les nuls") - `web.input`, `db.query`, et d'autres fonctions dans web.py renvoient des Objets de Stockage (Storage objects), qui sont comme des dictionnaires mis à part que vous pouvez écrire `d.foo` en plus de `d['foo']`. Cela rend le code plus clair.

Debugger

diff --git a/docs/0.3/tutorial.id.md b/docs/0.3/tutorial.id.md index 795fc10e..c4365f3e 100644 --- a/docs/0.3/tutorial.id.md +++ b/docs/0.3/tutorial.id.md @@ -152,7 +152,6 @@ nilai default: $ python code.py 1234 -

Menggunakan template

Menulis HTML di dalam Python bisa menjadi merepotkan; lebih nyaman diff --git a/docs/0.3/tutorial.zh-cn.md b/docs/0.3/tutorial.zh-cn.md index 5d249503..40761d9a 100644 --- a/docs/0.3/tutorial.zh-cn.md +++ b/docs/0.3/tutorial.zh-cn.md @@ -71,7 +71,6 @@ title: web.py 0.3 新手指南 这会告诉web.py为我们启动上面我们写的应用。 - 现在注意,即使我已经在这里说了很多,但我们真正有5行这些代码。这就是你需要编写的一个完整的web.py应用。 为了更方便的使用,你的完整代码应该像下面这样: @@ -161,7 +160,6 @@ URL 的后面的 `?` 看起来不好看?修改下 URL 配置: web.py的form模块能够帮助你生成HTML表单;获取用户的输入,并在处理或添加到数据库之前对其进行内容的验证。 如果你要学习更多关于form模块的使用,请查看[帮助文档](/docs/0.3)或者[Form](/form)类库的链接 -

数据库操作

**注意:** 在你开始使用数据库之前,确保你已经安装了合适的数据库访问库。比如对于MySQL数据库,使用 [MySQLdb](http://sourceforge.net/project/showfiles.php?group_id=22307) ,对于Postgres数据库使用[psycopg2](http://initd.org/pub/software/psycopg/)。 diff --git a/docs/work.md b/docs/work.md index 23ab0ab3..9c094556 100644 --- a/docs/work.md +++ b/docs/work.md @@ -24,7 +24,6 @@ When finishing working on something, delete it from the list. If a code block re 1. put new code at /foo/0.3 1. delete content at /foo, and update any urls that link to it - *** # Code samples: [Code samples](https://github.com/webpy/webpy-examples/) * Move url to /samples @@ -36,7 +35,6 @@ When finishing working on something, delete it from the list. If a code block re * alternate tutorial SQLite & SQLObject: 0.2 * templating with genshi: should be part of larger 'templating' section - ## tips & tricks * Possibly move entirely to cookbook? @@ -51,7 +49,6 @@ vhost, metaclass and multiple apps should have separate section, but this setup * serving images: 0.2, should use mimetypes module? * multiple apps: not needed - ## Real web apps * Leave them external, but annotate which version of webpy they use. diff --git a/index.fr.md b/index.fr.md index 6d709aa6..c65e4750 100644 --- a/index.fr.md +++ b/index.fr.md @@ -7,7 +7,6 @@ title: A propos de Web.py Autre langages : [english](/) | [Español](/index.es.html) | ... - **web.py** est un framework pour python qui est aussi simple qu'il est puissant. Web.py est dans le domaine publique; vous pouvez l'utiliser à toutes fins sans aucunes restrictions. ## Une application complète web.py @@ -28,7 +27,6 @@ Autre langages : [english](/) | [Español](/index.es.html) | ... if __name__ == "__main__": app.run() - ## Pour commençer web.py 0.51 a été réalisé le 2019-09-27: [web.py-0.51.tar.gz][16] diff --git a/install.es.md b/install.es.md index 0f9d5519..66f60fa9 100644 --- a/install.es.md +++ b/install.es.md @@ -131,7 +131,6 @@ A partir de la revisión 145, es necesario fijar una variable bin-environment en

.. con CGI

- Adicione lo siguiente en `httpd.conf` o `apache2.conf`. Alias /foo/static/ /camino/a/static @@ -164,7 +163,6 @@ Nota: Por la manera en que `web.py` está implementado, rompe el módulo `cgitb` web.internalerror = cgidebugerror -

.. con FastCGI

FastCGI es sencillo de configurar y funciona tan bien como mod_python. @@ -183,7 +181,6 @@ y apunte su navegador a `http://ejemplo.com/code.py/`. No olvide el slash del fi [Walter tiene consejos adicionales](http://lemurware.blogspot.com/2006/05/webpy-apache-configuration-and-you.html). -

.. con SCGI

https://www.mems-exchange.org/software/scgi/ Descargue el código fuente de `mod_scgi` aquí: http://www.mems-exchange.org/software/files/mod_scgi/ @@ -200,7 +197,6 @@ reinicie apache y luego corra su code.py con el comando siguiente: abra su navegador, visite 127.0.0.1. Funciona! -

.. con mod_python

mod_python funciona tan bien como FastCGI, pero no es tan sencillo de configurar. @@ -221,7 +217,6 @@ Para Python <2.5 haga lo siguiente: wget -O modpython_gateway.py http://svn.aminus.net/misc/modpython_gateway.py # u obtenga el fichero de esa dirección utilizando su navegador - Renombre su `code.py` a algo así como `codep.py` y adicione: app = web.application(urls, globals()) diff --git a/install.fr.md b/install.fr.md index 1cd31402..71eeffd9 100644 --- a/install.fr.md +++ b/install.fr.md @@ -23,7 +23,6 @@ Autre langages : [español](/install/es) | [Japan](/install/ja) | [chinese](/ins * [.. avec mod_wsgi](#apachemodwsgi) * [.. avec mod_rewrite](#apachemodrewrite) -

Installation

Pour installer web.py, commencez par télécharger l'archive: @@ -39,7 +38,6 @@ Note: sur certains systèmes Unix (ou Linux), il vous faudra vous connecter en t Une autre option est d'utiliser [Easy Install](http://peak.telecommunity.com/DevCenter/EasyInstall). Une fois Easy Install correctement paramétré, exécutez: - easy_install web.py

Développement:

@@ -109,7 +107,6 @@ Depuis la revision 145, il est nécessaire de définir une variable "bin-enviro

.. avec CGI

- Ajoutez les lignes suivante à `httpd.conf` ou `apache2.conf`. Alias /foo/static/ /path/to/static @@ -194,7 +191,6 @@ Pour Python <2.5, procéder plutôt ceci: wget -O modpython_gateway.py http://projects.amor.org/misc/browser/modpython_gateway.py?format=raw # or fetch the file from that address using your browser - renommez votre script `code.py` en quelque chose comme `codep.py` et ajoutez le code suivant: main = web.wsgifunc(web.webpyfunc(urls, globals())) diff --git a/install.it.md b/install.it.md index 2a24620a..86343dfe 100644 --- a/install.it.md +++ b/install.it.md @@ -23,7 +23,6 @@ guarda il [setup raccomandato](/recommended_setup) -in inglese-. Un'altra opzione è quella di usare[Easy Install](http://peak.telecommunity.com/DevCenter/EasyInstall). Una volta che [Easy Install](http://peak.telecommunity.com/DevCenter/EasyInstall) è stato settato correttamente, usare il seguente comando per installare automaticamente web.py: - easy_install web.py ## Sviluppo @@ -99,7 +98,6 @@ Aggiungi le seguenti righe al tuo file `httpd.conf` o `apache2.conf`. Alias /foo/static/ /path/to/static ScriptAlias /foo/ /path/to/code.py - #### .. con CGI usando il file .htaccess CGI è facile da configurare, ma non è adeguato per i siti che richiedono elevate prestazioni. @@ -180,7 +178,6 @@ Per python < 2.5 (precedente a 2.5) fai questo: wget -O modpython_gateway.py http://projects.amor.org/misc/browser/modpython_gateway.py?format=raw # o richiedi il file dal tuo browser - Rinomina il tuo `code.py` a qualcosa come `codep.py` e aggiungi: main = web.wsgifunc(web.webpyfunc(urls, globals())) diff --git a/install.ja.md b/install.ja.md index 88048c65..a29c2c95 100644 --- a/install.ja.md +++ b/install.ja.md @@ -22,7 +22,6 @@ web.pyをダウンロードします。 [Easy Install](http://peak.telecommunity.com/DevCenter/EasyInstall)を使えばワンステップでインストールすることが可能です。 - easy_install web.py ## 開発 @@ -104,7 +103,6 @@ Since revision 145, it is necessary to set a bin-environment variable on the fas Alias /foo/static/ /path/to/static ScriptAlias /foo/ /path/to/code.py - #### .. with CGI using .htaccess CGIは以下を`.htaccess`に追記するだけですので構築するのは簡単ですが、高性能なウェブサイトには向いていません。 @@ -149,7 +147,6 @@ and point your browser to `http://example.com/code.py/`. Don't forget the traili [Walterからの追加のアドバイスはこちら](http://lemurware.blogspot.com/2006/05/webpy-apache-configuration-and-you.html). - #### .. with SCGI https://www.mems-exchange.org/software/scgi/ download `mod_scgi` source here: http://www.mems-exchange.org/software/files/mod_scgi/ @@ -185,7 +182,6 @@ Python 2.5以前のバージョンを使用している場合: wget -O modpython_gateway.py http://projects.amor.org/misc/browser/modpython_gateway.py?format=raw # or fetch the file from that address using your browser - `code.py`のファイル名を`codep.py`に変更してください。 main = web.wsgifunc(web.webpyfunc(urls, globals())) diff --git a/install.md b/install.md index 544f0c9a..da54191c 100644 --- a/install.md +++ b/install.md @@ -135,7 +135,6 @@ Since revision 145, it is necessary to set a bin-environment variable on the fas

.. with CGI

- Add the following to `httpd.conf` or `apache2.conf`. Alias /foo/static/ /path/to/static @@ -168,7 +167,6 @@ Note: The way `web.py` is implemented breaks the `cgitb` module because it captu web.internalerror = cgidebugerror -

.. with FastCGI

FastCGI is easy to configure and performs as well as mod_python. @@ -187,7 +185,6 @@ and point your browser to `http://example.com/code.py/`. Don't forget the traili [Walter has some additional advice](http://lemurware.blogspot.com/2006/05/webpy-apache-configuration-and-you.html). -

.. with SCGI

https://www.mems-exchange.org/software/scgi/ download `mod_scgi` source here: http://www.mems-exchange.org/software/files/mod_scgi/ @@ -204,7 +201,6 @@ restart apache and then start your code.py in the command below: and open you browser,visit 127.0.0.1 It's ok! -

.. with mod_python

mod_python performs as well as FastCGI, but is not as straight-forward to configure. @@ -225,7 +221,6 @@ For Python <2.5 do this: wget -O modpython_gateway.py http://svn.aminus.net/misc/modpython_gateway.py # or fetch the file from that address using your browser - Rename your `code.py` to something like `codep.py` and add: app = web.application(urls, globals()) @@ -269,8 +264,6 @@ Also, you might want to read the "Application Working Directory" section from [C It should then be accessible at `http://example.com/code.py/` as usual. - -

mod_rewrite Rules for Apache

If you want web.py to be accessible at 'http://example.com' instead of 'http://example.com/code.py/' add the following rules to the `.htaccess` file: diff --git a/install.zh-cn.md b/install.zh-cn.md index 95b1f868..845e6f57 100644 --- a/install.zh-cn.md +++ b/install.zh-cn.md @@ -120,13 +120,11 @@ lighttpd config设置参考如下:

.. 使用 CGI

- 添加以下到 `httpd.conf` 或 `apache2.conf`。 Alias /foo/static/ /path/to/static ScriptAlias /foo/ /path/to/code.py -

.. 使用 CGI .htaccess

CGI很容易配置, 但不适合高性能网站。 @@ -208,7 +206,6 @@ mod_python 运行方式如同FastCGI, 但不是那么方便配置。 wget -O modpython_gateway.py http://projects.amor.org/misc/browser/modpython_gateway.py?format=raw # or fetch the file from that address using your browser - 重命名 `code.py` 为 `codep.py` 或别的名字, 添加: app = web.application(urls, globals()) diff --git a/recommended_setup.fr.md b/recommended_setup.fr.md index 016f8e8b..e240e183 100644 --- a/recommended_setup.fr.md +++ b/recommended_setup.fr.md @@ -15,7 +15,6 @@ Autre langages : [english](/recommended_setup) | ... * [Modèles, gabarits](#template) * [Entrées utilisateurs](#userinput) - Web.py recommande les logiciels suivants pour les serveurs de production:

Serveurs web:

@@ -29,7 +28,6 @@ Webpy dispose d'un serveur web interne, mais il devrait être utilisé pour le d Webpy ne nécessite pas de base de données pour fonctionner. Il supporte néanmoins les bases suivantes: - * [postgresql](http://www.postgresql.org/download/) [BSD] [(doc)](http://www.postgresql.org/docs/) avec [psycopg2](http://initd.org/pub/software/psycopg/) [BSD] [(doc)](http://www.initd.org/tracker/psycopg/wiki/PsycopgTwo) comme client python. ('easy_install psycopg2') * [mysql](http://dev.mysql.com/downloads/mysql/5.0.html) [GPL] [(doc)](http://www.mysql.org/doc/) avec [MySQLdb](http://sourceforge.net/project/showfiles.php?group_id=22307) [CNRI] [(doc)](http://mysql-python.sourceforge.net/MySQLdb.html) comme client python ('easy_install MySQL-python') * [sqlite](http://www.sqlite.org/) [Public domain] [(doc)](http://www.sqlite.org/docs.html) avec [pysqlite](http://code.google.com/p/pysqlite/) comme client python ('easy_install pysqlite'). From 4d89d3cfdb54384f01e812b841ec00774512263a Mon Sep 17 00:00:00 2001 From: nattheriddle1 <69092489+nattheriddle1@users.noreply.github.com> Date: Mon, 25 Jul 2022 13:37:08 -0500 Subject: [PATCH 08/13] Standardized ellipses Standardized number of dots in ellipses and surrounding spacing. --- cookbook/cgi-apache.md | 2 +- cookbook/fastcgi-lighttpd.fr.md | 2 +- cookbook/sessions_with_subapp.fr.md | 4 ++-- cookbook/sessions_with_subapp.md | 8 +++---- cookbook/sessions_with_subapp.zh-cn.md | 4 ++-- docs/0.2/tutorial2.ru.md | 2 +- docs/0.3/tutorial.fr.md | 2 +- install.es.md | 30 +++++++++++++------------- install.fr.md | 26 +++++++++++----------- install.it.md | 14 ++++++------ install.ja.md | 14 ++++++------ install.md | 30 +++++++++++++------------- install.zh-cn.md | 30 +++++++++++++------------- 13 files changed, 84 insertions(+), 84 deletions(-) diff --git a/cookbook/cgi-apache.md b/cookbook/cgi-apache.md index 84d991a6..0a2df4b4 100644 --- a/cookbook/cgi-apache.md +++ b/cookbook/cgi-apache.md @@ -60,7 +60,7 @@ So now if you go to `http://server/app/` you'll hit `app.py`'s handler for `'/'` Are we done? Well, that's what I thought. There's still one problem: webpy doesn't know how things were rewritten on the way *in*, so it doesn't know how to rewrite them on the way *out*. -For instance, one can normally use `web.url()` to compose urls such that the right content is found. Want `static/style.css`? Call `web.url('/static/style.css') and you'll get ... `/app/app.py/static/style.css` ... not what we wanted. That doesn't exist. Problem. +For instance, one can normally use `web.url()` to compose urls such that the right content is found. Want `static/style.css`? Call `web.url('/static/style.css') and you'll get... `/app/app.py/static/style.css` ...not what we wanted. That doesn't exist. Problem. If you don't use `web.url()`, it can still bite you because *webpy* does. Say `raise web.seeother('/')` and you'll end up at `http://server/app/app.py/`, which defeats the purpose of hiding it using mod_rewrite. diff --git a/cookbook/fastcgi-lighttpd.fr.md b/cookbook/fastcgi-lighttpd.fr.md index bd0b4711..82f3717c 100644 --- a/cookbook/fastcgi-lighttpd.fr.md +++ b/cookbook/fastcgi-lighttpd.fr.md @@ -110,7 +110,7 @@ En haut du fichier, ajoutez: #!/usr/bin/env python ``` -.. et n'oubliez pas de le rendre executable (Autrement, vous aurez une erreur "permission denied"): +...et n'oubliez pas de le rendre executable (Autrement, vous aurez une erreur "permission denied"): ``` $ chmod 755 /path-to/webpy-app/code.py diff --git a/cookbook/sessions_with_subapp.fr.md b/cookbook/sessions_with_subapp.fr.md index 14c7f628..199e9d17 100644 --- a/cookbook/sessions_with_subapp.fr.md +++ b/cookbook/sessions_with_subapp.fr.md @@ -22,14 +22,14 @@ Dans votre application principale (code.py par defaut), initialisez votre sessio session = web.session.Session(app, web.session.DiskStore('sessions'), initializer = {'test': 'woot', 'foo':''}) -.. puis créez un processor via web.loadhook +...puis créez un processor via web.loadhook def session_hook(): web.ctx.session = session app.add_processor(web.loadhook(session_hook)) -.. et maintenant dans votre sous-application (par exemple sub-app.py) vous pouvez accèder aux informations de session de cette manière: +...et maintenant dans votre sous-application (par exemple sub-app.py) vous pouvez accèder aux informations de session de cette manière: print web.ctx.session.test web.ctx.session.foo = 'bar' \ No newline at end of file diff --git a/cookbook/sessions_with_subapp.md b/cookbook/sessions_with_subapp.md index 3c0ce117..7514bbbd 100644 --- a/cookbook/sessions_with_subapp.md +++ b/cookbook/sessions_with_subapp.md @@ -20,25 +20,25 @@ In your app.py (or main.py) initialize your session like this: session = web.session.Session(app, web.session.DiskStore('sessions'), initializer = {'test': 'woot', 'foo':''}) -.. and create a processor via web.loadhook: +...and create a processor via web.loadhook: def session_hook(): web.ctx.session = session app.add_processor(web.loadhook(session_hook)) -.. and now in your 'sub-apps' (like sub-app.py) you can access the the session information like this: +...and now in your 'sub-apps' (like sub-app.py) you can access the the session information like this: print web.ctx.session.test web.ctx.session.foo = 'bar' -.. if you want to make sessions avaible in templates you should change session_hook function like this: +...if you want to make sessions avaible in templates you should change session_hook function like this: def session_hook(): web.ctx.session = session web.template.Template.globals['session'] = session -.. and now you can write in template something like this: +...and now you can write in template something like this: $session.get('logged_in', ''):

You are $session.username

diff --git a/cookbook/sessions_with_subapp.zh-cn.md b/cookbook/sessions_with_subapp.zh-cn.md index 20e86e37..4f2905dd 100644 --- a/cookbook/sessions_with_subapp.zh-cn.md +++ b/cookbook/sessions_with_subapp.zh-cn.md @@ -18,14 +18,14 @@ web.py默认session信息只能在主应用中共享,即便在其他模块中i session = web.session.Session(app, web.session.DiskStore('sessions'), initializer = {'test': 'woot', 'foo':''}) -.. 接下来创建一个被web.loadhook加载的处理器(processor) +...接下来创建一个被web.loadhook加载的处理器(processor) def session_hook(): web.ctx.session = session app.add_processor(web.loadhook(session_hook)) -.. 在子应用(假设是sub-app.py)中,可以这样操作session: +...在子应用(假设是sub-app.py)中,可以这样操作session: print web.ctx.session.test web.ctx.session.foo = 'bar' \ No newline at end of file diff --git a/docs/0.2/tutorial2.ru.md b/docs/0.2/tutorial2.ru.md index 2d921b51..98a55ac9 100644 --- a/docs/0.2/tutorial2.ru.md +++ b/docs/0.2/tutorial2.ru.md @@ -81,7 +81,7 @@ python, в том числе **scgi** и **mod_python**. Написание HTML внутри кода на Python это отвратительно. Куда веселее писать на Python внутри HTML. К счастью web.py позволяет нам это делать, с легкостью. -Cоздадим каталог для наших темплейтов (назовем его... ммм.... "templates"). Внутри этого каталога создадим файлик с расширением .html (скажем **index.html**). Теперь внутри это файла напиешем нормальный HTML: +Cоздадим каталог для наших темплейтов (назовем его... ммм... "templates"). Внутри этого каталога создадим файлик с расширением .html (скажем **index.html**). Теперь внутри это файла напиешем нормальный HTML: Превед, орлы! diff --git a/docs/0.3/tutorial.fr.md b/docs/0.3/tutorial.fr.md index 4d96e72f..55fb3c19 100644 --- a/docs/0.3/tutorial.fr.md +++ b/docs/0.3/tutorial.fr.md @@ -49,7 +49,7 @@ Maintenant, Nous devons donner à web.py notre structure URL. Commençons avec q '/', 'index' ) -La première partie est une expression régulière que l'on applique à une chaîne de caractère (l'URL), telle que /, /help/faq, /item/(\d+), etc.. (Note: \d+ n'admettra qu'une séquence de chiffre). Les parenthèses signifient qu'il faut capturer la séquence pour s'en servir plus tard. La seconde partie est le nom d'une Classe vers laquelle la requête sera envoyée, comme 'index', 'view', 'welcome.hello' (qui recherchera la Classe hello du module welcome.), ou get_\1. +La première partie est une expression régulière que l'on applique à une chaîne de caractère (l'URL), telle que /, /help/faq, /item/(\d+), etc... (Note: \d+ n'admettra qu'une séquence de chiffre). Les parenthèses signifient qu'il faut capturer la séquence pour s'en servir plus tard. La seconde partie est le nom d'une Classe vers laquelle la requête sera envoyée, comme 'index', 'view', 'welcome.hello' (qui recherchera la Classe hello du module welcome.), ou get_\1. /1 est remplacé par la première capture de l'expression régulière; toutes les captures restantes seront passées à votre fonction. [Note traducteur : A préciser] Cette ligne signifie que nous souhaitons l'URL / (Note: la page d'accueil) qui doit être traitée par la classe nommée 'index'. diff --git a/install.es.md b/install.es.md index 66f60fa9..3f1d4f5e 100644 --- a/install.es.md +++ b/install.es.md @@ -14,15 +14,15 @@ Otros idiomas : [english](/install) | [Japan 日本語 ](/install.ja) | [chinese * [Producción](#prod) * [Nginx](#nginx) * [LightTPD](#lighttpd) - * [.. con FastCGI](#lighttpdfastcgi) + * [...con FastCGI](#lighttpdfastcgi) * [Apache](#apache) - * [.. con CGI](#apachecgi) - * [ .. con CGI usando .htaccess](#apachecgihtaccess) - * [.. con FastCGI](#apachefastcgi) - * [.. con SCGI](#apachescgi) - * [.. con mod_python](#apachemodpython) - * [.. con mod_wsgi](#apachemodwsgi) - * [.. con mod_rewrite](#apachemodrewrite) + * [...con CGI](#apachecgi) + * [...con CGI usando .htaccess](#apachecgihtaccess) + * [...con FastCGI](#apachefastcgi) + * [...con SCGI](#apachescgi) + * [...con mod_python](#apachemodpython) + * [...con mod_wsgi](#apachemodwsgi) + * [...con mod_rewrite](#apachemodrewrite)

Instalación

@@ -86,7 +86,7 @@ Y corra `chmod +x code.py` para hacerlo ejecutable.

Lighttpd

-

.. con FastCGI

+

...con FastCGI

FastCGI con lighttpd es la manera sugerida para usar web.py en producción. [reddit.com][3] maneja millones de hits con esta configuración. @@ -129,14 +129,14 @@ A partir de la revisión 145, es necesario fijar una variable bin-environment en

Apache

-

.. con CGI

+

...con CGI

Adicione lo siguiente en `httpd.conf` o `apache2.conf`. Alias /foo/static/ /camino/a/static ScriptAlias /foo/ /camino/a/code.py -

.. con CGI usando .htaccess

+

...con CGI usando .htaccess

CGI es fácil de configurar, pero no es adecuado para sitios que requieren alto rendimiento. Adicione esto a su `.htaccess`: @@ -163,7 +163,7 @@ Nota: Por la manera en que `web.py` está implementado, rompe el módulo `cgitb` web.internalerror = cgidebugerror -

.. con FastCGI

+

...con FastCGI

FastCGI es sencillo de configurar y funciona tan bien como mod_python. @@ -181,7 +181,7 @@ y apunte su navegador a `http://ejemplo.com/code.py/`. No olvide el slash del fi [Walter tiene consejos adicionales](http://lemurware.blogspot.com/2006/05/webpy-apache-configuration-and-you.html). -

.. con SCGI

+

...con SCGI

https://www.mems-exchange.org/software/scgi/ Descargue el código fuente de `mod_scgi` aquí: http://www.mems-exchange.org/software/files/mod_scgi/ Usuario de Apache en Windows: @@ -197,7 +197,7 @@ reinicie apache y luego corra su code.py con el comando siguiente: abra su navegador, visite 127.0.0.1. Funciona! -

.. con mod_python

+

...con mod_python

mod_python funciona tan bien como FastCGI, pero no es tan sencillo de configurar. @@ -232,7 +232,7 @@ Probablemente desee añadir una regla de reescritura (`RewriteRule`) apuntando ` Asegúrese de visitar `/codep.py/` con el `/` al final. De otra forma, verá un mensaje de error como `A server error occurred. Please contact the administrator.` -

.. con mod_wsgi

+

...con mod_wsgi

mod\_wsgi es un nuevo módulo de Apache que [típicamente mejora el rendimiento respecto a mod_python](http://code.google.com/p/modwsgi/wiki/PerformanceEstimates) a la hora de alojar aplicaciones WSGI, y que además es muy fácil de configurar. diff --git a/install.fr.md b/install.fr.md index 71eeffd9..ad8ef6aa 100644 --- a/install.fr.md +++ b/install.fr.md @@ -16,12 +16,12 @@ Autre langages : [español](/install/es) | [Japan](/install/ja) | [chinese](/ins * [...avec FastCGI](#lighttpdfastcgi) * [Apache](#apache) * [...avec CGI](#apachecgi) - * [.. avec CGI en utilisant .htaccess](#apachecgihtaccess) - * [.. avec FastCGI](#apachefastcgi) - * [.. avec SCGI](#apachescgi) - * [.. avec mod_python](#apachemodpython) - * [.. avec mod_wsgi](#apachemodwsgi) - * [.. avec mod_rewrite](#apachemodrewrite) + * [...avec CGI en utilisant .htaccess](#apachecgihtaccess) + * [...avec FastCGI](#apachefastcgi) + * [...avec SCGI](#apachescgi) + * [...avec mod_python](#apachemodpython) + * [...avec mod_wsgi](#apachemodwsgi) + * [...avec mod_rewrite](#apachemodrewrite)

Installation

Pour installer web.py, commencez par télécharger l'archive: @@ -62,7 +62,7 @@ N'oubliez pas de le rendre exécutable: `chmod +x code.py`.

LightTPD

-

.. avec FastCGI

+

...avec FastCGI

FastCGI associé à lighttpd est la manière recommandée d'utiliser web.py en production. [reddit.com][3] gère des millions de visites de cette façon. @@ -105,14 +105,14 @@ Depuis la revision 145, il est nécessaire de définir une variable "bin-enviro

Apache

-

.. avec CGI

+

...avec CGI

Ajoutez les lignes suivante à `httpd.conf` ou `apache2.conf`. Alias /foo/static/ /path/to/static ScriptAlias /foo/ /path/to/code.py -

.. avec CGI en utilisant .htaccess

+

...avec CGI en utilisant .htaccess

CGI est facile à configurer mais ce n'est pas la meilleure des solutions pour les sites à très fort trafic. @@ -141,7 +141,7 @@ Note: la manière dont `web.py` est implémenté provoque une erreur du module ` web.internalerror = cgidebugerror -

.. avec FastCGI

+

...avec FastCGI

FastCGI est facile à configurer et est aussi performant que 'mod_python'. @@ -155,7 +155,7 @@ Malheureusement, et contrairement à lighttpd, Apache ne donne aucune indication web.wsgi.runwsgi = lambda func, addr=None: web.wsgi.runfcgi(func, addr) -

.. avec SCGI

+

...avec SCGI

Téléchargez et installez le [module mod_scgi](http://www.mems-exchange.org/software/files/mod_scgi/) @@ -171,7 +171,7 @@ redémarrez le serveur Apache et lancer votre 'code.py' avec la commande suivant lancez votre navigateur et visitez l'adresse suivante 127.0.0.1 C'est aussi simple que ça...enfin, si ça marche du premier coup ;-) -

.. avec mod_python

+

...avec mod_python

mod_python est aussi performant que FastCGI, mais il n'est pas aussi évident à configurer. Suivez le guide: @@ -205,7 +205,7 @@ Dans votre fichier `.htaccess`, ajoutez: Vous aurez surement aussi besoin d'ajouter une `RewriteRule` pour rediriger `/` vers `/codep.py/` -

.. avec mod_wsgi

+

...avec mod_wsgi

mod\_wsgi est un nouveau module Apache [plus performant que mod_python](http://code.google.com/p/modwsgi/wiki/PerformanceEstimates) pour l'hébergement d'applications WSGI, et très facile à mettre en place. diff --git a/install.it.md b/install.it.md index 86343dfe..d179a46f 100644 --- a/install.it.md +++ b/install.it.md @@ -45,7 +45,7 @@ ed esegui `chmod +x code.py` per renderlo eseguibile. ### LightTPD -#### ... con FastCGI +#### ...con FastCGI FastCGI con lighttpd è la soluzione raccomandata di usare web.py in fase di produzione. [reddit.com][3] gestisce milioni di richieste con questa configurazione! @@ -91,14 +91,14 @@ Questo comporta una variazione della tua configurazione del webserver ala voce f ### Apache -#### .. con CGI +#### ...con CGI Aggiungi le seguenti righe al tuo file `httpd.conf` o `apache2.conf`. Alias /foo/static/ /path/to/static ScriptAlias /foo/ /path/to/code.py -#### .. con CGI usando il file .htaccess +#### ...con CGI usando il file .htaccess CGI è facile da configurare, ma non è adeguato per i siti che richiedono elevate prestazioni. Per usare web.py con CGI aggiungi le seguenti righe al tuo `.htaccess`: @@ -126,7 +126,7 @@ Nota: Il modo in cui `web.py` è implementato non lavora con il modulo `cgitb` p web.internalerror = cgidebugerror -#### .. con FastCGI +#### ...con FastCGI FastCGI è facile da configurare e agisce come mod_python. Aggiungi quanto segue al tuo `.htaccess`: @@ -142,7 +142,7 @@ e indirizza il tuo browser a `http://example.com/code.py/`. Non dimenticare lo s [Walter ha altri consigli](http://lemurware.blogspot.com/2006/05/webpy-apache-configuration-and-you.html)[e](http://www.dofollownet.com/). -#### .. con SCGI +#### ...con SCGI https://www.mems-exchange.org/software/scgi/ scarica i sorgenti di `mod_scgi` da qui: http://www.mems-exchange.org/software/files/mod_scgi/ Per gli utenti apache su Windows: @@ -158,7 +158,7 @@ riavvia il webserver apache e poi avvia la tua applicazione code.py con il segue e apri il tuo browser, visita 127.0.0.1 E' tutto a posto! -#### .. con mod_python +#### ...con mod_python mod_python funziona come FastCGI, ma non è semplice da configurare. @@ -194,7 +194,7 @@ Probabilmente tu vorrai aggiungere una `RewriteRule` che punta `/` a `/codep.py/ Sii sicuro di visitare `/codep.py/` con lo slash `/` extra alla fine. Altrimenti vedrai un messaggio di errore come `A server error occurred. Please contact the administrator.` -#### .. con mod_wsgi +#### ...con mod_wsgi mod\_wsgi è un nuovo modulo Apache che [tipicamente supera le peformance di mod_python](http://code.google.com/p/modwsgi/wiki/PerformanceEstimates)per hostare applicazioni WSGI, ed è veramente semplice da settare. diff --git a/install.ja.md b/install.ja.md index a29c2c95..30612859 100644 --- a/install.ja.md +++ b/install.ja.md @@ -52,7 +52,7 @@ CGI実行を行う場合はファイル`code.py`の先頭に以下を追記し ### LightTPD -#### .. with FastCGI +#### ...with FastCGI web.pyでは、lighttpd + FastCGI方式が推奨されています。[reddit.com][3] はこの方式で何百万ものアクセスに応答しています。 @@ -96,14 +96,14 @@ Since revision 145, it is necessary to set a bin-environment variable on the fas ### Apache -#### .. with CGI +#### ...with CGI `httpd.conf`もしくは`apache2.conf`に以下を追記してください。 Alias /foo/static/ /path/to/static ScriptAlias /foo/ /path/to/code.py -#### .. with CGI using .htaccess +#### ...with CGI using .htaccess CGIは以下を`.htaccess`に追記するだけですので構築するのは簡単ですが、高性能なウェブサイトには向いていません。 @@ -130,7 +130,7 @@ Note: The way `web.py` is implemented breaks the `cgitb` module because it captu web.internalerror = cgidebugerror -#### .. with FastCGI +#### ...with FastCGI FastCGIを構築するのは簡単で、mod_pythonと同じ動作をします。 @@ -147,7 +147,7 @@ and point your browser to `http://example.com/code.py/`. Don't forget the traili [Walterからの追加のアドバイスはこちら](http://lemurware.blogspot.com/2006/05/webpy-apache-configuration-and-you.html). -#### .. with SCGI +#### ...with SCGI https://www.mems-exchange.org/software/scgi/ download `mod_scgi` source here: http://www.mems-exchange.org/software/files/mod_scgi/ windows apache user: @@ -162,7 +162,7 @@ apacheの再起動とcode.pyを以下のコマンドで起動してください 起動後、ブラウザで 127.0.0.1を開いて確認してください。 -#### .. with mod_python +#### ...with mod_python mod_pythonは、FastCGIと同様に動作しますが、構築するのは簡単ではありません。 @@ -198,7 +198,7 @@ Python 2.5以前のバージョンを使用している場合: `/codep.py/` の末尾 `/`(スラッシュ)を忘れると、`エラー画面(Please contact the administrator.)`が表示されます。 -#### .. with mod_wsgi +#### ...with mod_wsgi mod_wsgiは、特色として[mod_pythonより性能](http://code.google.com/p/modwsgi/wiki/PerformanceEstimates)が優れており、構築が非常に簡単な新しいApacheモジュールです。 diff --git a/install.md b/install.md index da54191c..032c71ea 100644 --- a/install.md +++ b/install.md @@ -14,15 +14,15 @@ Other languages : [español](/install.es) | [Japan 日本語 ](/install.ja) | [c * [Production](#prod) * [Nginx](#nginx) * [LightTPD](#lighttpd) - * [.. with FastCGI](#lighttpdfastcgi) + * [...with FastCGI](#lighttpdfastcgi) * [Apache](#apache) - * [.. with CGI](#apachecgi) - * [ .. with CGI using .htaccess](#apachecgihtaccess) - * [.. with FastCGI](#apachefastcgi) - * [.. with SCGI](#apachescgi) - * [.. with mod_python](#apachemodpython) - * [.. with mod_wsgi](#apachemodwsgi) - * [.. with mod_rewrite](#apachemodrewrite) + * [...with CGI](#apachecgi) + * [ ...with CGI using .htaccess](#apachecgihtaccess) + * [...with FastCGI](#apachefastcgi) + * [...with SCGI](#apachescgi) + * [...with mod_python](#apachemodpython) + * [...with mod_wsgi](#apachemodwsgi) + * [...with mod_rewrite](#apachemodrewrite)

Install

@@ -90,7 +90,7 @@ And run `chmod +x code.py` to make it executable.

Lighttpd

-

.. with FastCGI

+

...with FastCGI

FastCGI with lighttpd is the recommended way of using web.py in production. [reddit.com][3] handles millions of hits this way. @@ -133,14 +133,14 @@ Since revision 145, it is necessary to set a bin-environment variable on the fas

Apache

-

.. with CGI

+

...with CGI

Add the following to `httpd.conf` or `apache2.conf`. Alias /foo/static/ /path/to/static ScriptAlias /foo/ /path/to/code.py -

.. with CGI using .htaccess

+

...with CGI using .htaccess

CGI is easy to configure, but is not suitable for high-performance websites. Add this to your `.htaccess`: @@ -167,7 +167,7 @@ Note: The way `web.py` is implemented breaks the `cgitb` module because it captu web.internalerror = cgidebugerror -

.. with FastCGI

+

...with FastCGI

FastCGI is easy to configure and performs as well as mod_python. @@ -185,7 +185,7 @@ and point your browser to `http://example.com/code.py/`. Don't forget the traili [Walter has some additional advice](http://lemurware.blogspot.com/2006/05/webpy-apache-configuration-and-you.html). -

.. with SCGI

+

...with SCGI

https://www.mems-exchange.org/software/scgi/ download `mod_scgi` source here: http://www.mems-exchange.org/software/files/mod_scgi/ windows apache user: @@ -201,7 +201,7 @@ restart apache and then start your code.py in the command below: and open you browser,visit 127.0.0.1 It's ok! -

.. with mod_python

+

...with mod_python

mod_python performs as well as FastCGI, but is not as straight-forward to configure. @@ -236,7 +236,7 @@ You also probably want to add a `RewriteRule` pointing `/` to `/codep.py/` Be sure to visit `/codep.py/` with the extra `/` on the end. Otherwise, you'll see an error message like `A server error occurred. Please contact the administrator.` -

.. with mod_wsgi

+

...with mod_wsgi

mod\_wsgi is a new Apache module which [typically outperforms mod_python](http://code.google.com/p/modwsgi/wiki/PerformanceEstimates) for hosting WSGI applications, and is very easy to set up. diff --git a/install.zh-cn.md b/install.zh-cn.md index 845e6f57..5964e575 100644 --- a/install.zh-cn.md +++ b/install.zh-cn.md @@ -11,15 +11,15 @@ title: 安装 web.py * [开发](#dev) * [产品](#prod) * [LightTPD](#lighttpd) - * [.. 使用 FastCGI](#lighttpdfastcgi) + * [...使用 FastCGI](#lighttpdfastcgi) * [Apache](#apache) - * [.. 使用 CGI](#apachecgi) - * [ .. 使用 CGI using .htaccess](#apachecgihtaccess) - * [.. 使用 FastCGI](#apachefastcgi) - * [.. 使用 SCGI](#apachescgi) - * [.. 使用 mod_python](#apachemodpython) - * [.. 使用 mod_wsgi](#apachemodwsgi) - * [.. 使用 mod_rewrite](#apachemodrewrite) + * [...使用 CGI](#apachecgi) + * [ ...使用 CGI using .htaccess](#apachecgihtaccess) + * [...使用 FastCGI](#apachefastcgi) + * [...使用 SCGI](#apachescgi) + * [...使用 mod_python](#apachemodpython) + * [...使用 mod_wsgi](#apachemodwsgi) + * [...使用 mod_rewrite](#apachemodrewrite)

安装

@@ -74,7 +74,7 @@ web.py 内置了web服务器。可以按照 [tutorial](http://webpy.org/docs/0.3

LightTPD

-

.. 使用 FastCGI

+

...使用 FastCGI

在产品中通过FastCGI结合lighttpd是web.py使用的一种推荐方法。 [reddit.com][3] 通过该方法来处理百万次的点击。 @@ -118,14 +118,14 @@ lighttpd config设置参考如下:

Apache

-

.. 使用 CGI

+

...使用 CGI

添加以下到 `httpd.conf` 或 `apache2.conf`。 Alias /foo/static/ /path/to/static ScriptAlias /foo/ /path/to/code.py -

.. 使用 CGI .htaccess

+

...使用 CGI .htaccess

CGI很容易配置, 但不适合高性能网站。 添加以下到你的 `.htaccess`: @@ -153,7 +153,7 @@ CGI很容易配置, 但不适合高性能网站。 web.internalerror = cgidebugerror -

.. 使用 FastCGI

+

...使用 FastCGI

FastCGI很容易配置,运行方式如同mod_python。 @@ -170,7 +170,7 @@ FastCGI很容易配置,运行方式如同mod_python。 [Walter 还有一些额外建议](http://lemurware.blogspot.com/2006/05/webpy-apache-configuration-and-you.html). -

.. 使用 SCGI

+

...使用 SCGI

https://www.mems-exchange.org/software/scgi/ 从 http://www.mems-exchange.org/software/files/mod_scgi/ 下载 `mod_scgi` 代码 windows apache 用户: @@ -186,7 +186,7 @@ windows apache 用户: 打开你的浏览器,访问127.0.0.1 It's ok! -

.. 使用 mod_python

+

...使用 mod_python

mod_python 运行方式如同FastCGI, 但不是那么方便配置。 @@ -223,7 +223,7 @@ mod_python 运行方式如同FastCGI, 但不是那么方便配置。 确保访问 `/codep.py/` 的时候有添加最后的 `/`。 否则,你将会看到一条错误信息,比如 `A server error occurred. Please contact the administrator.` -

.. 使用 mod_wsgi

+

...使用 mod_wsgi

mod\_wsgi 是一个新的Apache模块 [通常优于mod_python](http://code.google.com/p/modwsgi/wiki/PerformanceEstimates) 用于架设WSGI应用,它非常容易配置。 From 85b347d471c1951e73be0f1fb5d389586f04f05b Mon Sep 17 00:00:00 2001 From: nattheriddle1 <69092489+nattheriddle1@users.noreply.github.com> Date: Wed, 3 Aug 2022 09:59:59 -0500 Subject: [PATCH 09/13] Made Other Languages lines consistent Removed spaces, added colons, and capitalized where necessary. --- cookbook/application_processors.fr.md | 2 +- cookbook/application_processors.md | 2 +- cookbook/cookies.fr.md | 2 +- cookbook/cookies.md | 2 +- cookbook/ctx.fr.md | 2 +- cookbook/ctx.md | 2 +- cookbook/custom_notfound.fr.md | 2 +- cookbook/custom_notfound.md | 2 +- cookbook/fastcgi-lighttpd.fr.md | 2 +- cookbook/fastcgi-lighttpd.md | 2 +- cookbook/fileupload.fr.md | 2 +- cookbook/fileupload.md | 2 +- cookbook/forms.fr.md | 2 +- cookbook/forms.md | 2 +- cookbook/helloworld.fr.md | 2 +- cookbook/helloworld.md | 2 +- cookbook/index.fr.md | 2 +- cookbook/input.fr.md | 2 +- cookbook/input.md | 2 +- cookbook/layout_template.fr.md | 2 +- cookbook/layout_template.md | 2 +- cookbook/limiting_upload_size.fr.md | 2 +- cookbook/limiting_upload_size.md | 2 +- cookbook/logging.fr.md | 2 +- cookbook/logging.md | 2 +- cookbook/postbasic.fr.md | 2 +- cookbook/postbasic.md | 2 +- cookbook/redirect+seeother.fr.md | 2 +- cookbook/redirect+seeother.md | 2 +- cookbook/sendmail_using_gmail.fr.md | 2 +- cookbook/sendmail_using_gmail.md | 2 +- cookbook/session_in_template.fr.md | 2 +- cookbook/session_in_template.md | 2 +- cookbook/session_with_reloader.fr.md | 2 +- cookbook/session_with_reloader.md | 2 +- cookbook/sessions.fr.md | 2 +- cookbook/sessions.md | 2 +- cookbook/sessions_with_subapp.fr.md | 2 +- cookbook/sessions_with_subapp.md | 2 +- cookbook/ssl.fr.md | 2 +- cookbook/ssl.md | 2 +- cookbook/staticfiles.fr.md | 2 +- cookbook/staticfiles.md | 2 +- cookbook/storeupload.fr.md | 2 +- cookbook/storeupload.md | 2 +- cookbook/streaming_large_files.fr.md | 2 +- cookbook/streaming_large_files.md | 2 +- cookbook/subapp.fr.md | 2 +- cookbook/subapp.md | 2 +- cookbook/url_handling.fr.md | 2 +- cookbook/url_handling.md | 2 +- cookbook/userauth.fr.md | 2 +- cookbook/userauth.md | 2 +- cookbook/xmlfiles.fr.md | 2 +- cookbook/xmlfiles.md | 2 +- docs/0.2/tutorial2.md | 2 +- docs/0.3.fr/index.md | 2 +- docs/0.3/app_processors.fr.md | 2 +- docs/0.3/app_processors.md | 2 +- docs/0.3/apps.fr.md | 2 +- docs/0.3/apps/auto.fr.md | 2 +- docs/0.3/apps/auto.md | 2 +- docs/0.3/apps/basic.fr.md | 2 +- docs/0.3/apps/basic.md | 2 +- docs/0.3/apps/index.md | 2 +- docs/0.3/index.md | 2 +- docs/0.3/sessions.fr.md | 2 +- docs/0.3/sessions.md | 2 +- docs/0.3/templetor.md | 2 +- docs/0.3/tutorial.fr.md | 2 +- docs/0.3/tutorial.md | 2 +- download.fr.md | 2 +- download.md | 2 +- index.es.md | 2 +- index.fr.md | 2 +- index.md | 2 +- install.es.md | 2 +- install.fr.md | 2 +- install.md | 2 +- recommended_setup.fr.md | 2 +- recommended_setup.md | 2 +- 81 files changed, 81 insertions(+), 81 deletions(-) diff --git a/cookbook/application_processors.fr.md b/cookbook/application_processors.fr.md index 4ec9732e..2a15ca1c 100644 --- a/cookbook/application_processors.fr.md +++ b/cookbook/application_processors.fr.md @@ -5,7 +5,7 @@ title: Application processors, hooks # Application processors, hooks -Autre langages [english](/../application_processors) | ... +Autre langages: [English](/../application_processors) | ... ## Probleme diff --git a/cookbook/application_processors.md b/cookbook/application_processors.md index 1fbfd1b8..599d96ee 100644 --- a/cookbook/application_processors.md +++ b/cookbook/application_processors.md @@ -5,7 +5,7 @@ title: Application processors, hooks # Application processors, hooks -Other languages : [français](/../cookbook/application_processors.fr) | ... +Other languages: [Français](/../cookbook/application_processors.fr) | ... ## Problem diff --git a/cookbook/cookies.fr.md b/cookbook/cookies.fr.md index 69b02e9b..27ffa0cb 100644 --- a/cookbook/cookies.fr.md +++ b/cookbook/cookies.fr.md @@ -5,7 +5,7 @@ title: Travailler avec les cookies # Travailler avec les cookies -Autre langages: [english](/../cookies) | ... +Autre langages: [English](/../cookies) | ... ## Problème: diff --git a/cookbook/cookies.md b/cookbook/cookies.md index fbdd19fa..f87eea2c 100644 --- a/cookbook/cookies.md +++ b/cookbook/cookies.md @@ -5,7 +5,7 @@ title: cookies # cookies -Other languages: [français](/../cookbook/cookies.fr) | ... +Other languages: [Français](/../cookbook/cookies.fr) | ... ## Problem diff --git a/cookbook/ctx.fr.md b/cookbook/ctx.fr.md index 078c8d2b..e7f9f728 100644 --- a/cookbook/ctx.fr.md +++ b/cookbook/ctx.fr.md @@ -5,7 +5,7 @@ title: web.ctx # web.ctx -Autre langages: [english](/../ctx) | ... +Autre langages: [English](/../ctx) | ... Probleme ------- diff --git a/cookbook/ctx.md b/cookbook/ctx.md index b7fbbfe3..b50368af 100644 --- a/cookbook/ctx.md +++ b/cookbook/ctx.md @@ -5,7 +5,7 @@ title: ctx # ctx -Other languages: [français](/../cookbook/ctx.fr) | ... +Other languages: [Français](/../cookbook/ctx.fr) | ... Problem ------- diff --git a/cookbook/custom_notfound.fr.md b/cookbook/custom_notfound.fr.md index d5f67ad9..d6d3662b 100644 --- a/cookbook/custom_notfound.fr.md +++ b/cookbook/custom_notfound.fr.md @@ -5,7 +5,7 @@ title: Personnaliser le message NotFound # Personnaliser le message NotFound -Autre langages: [english](/../custom_notfound) | ... +Autre langages: [English](/../custom_notfound) | ... ## Probleme diff --git a/cookbook/custom_notfound.md b/cookbook/custom_notfound.md index 522cd0e3..fc05e72c 100644 --- a/cookbook/custom_notfound.md +++ b/cookbook/custom_notfound.md @@ -5,7 +5,7 @@ title: Custom NotFound message # Custom NotFound message -Other languages: [français](/../cookbook/custom_notfound.fr) | ... +Other languages: [Français](/../cookbook/custom_notfound.fr) | ... ## Problem diff --git a/cookbook/fastcgi-lighttpd.fr.md b/cookbook/fastcgi-lighttpd.fr.md index 82f3717c..bf2eebf4 100644 --- a/cookbook/fastcgi-lighttpd.fr.md +++ b/cookbook/fastcgi-lighttpd.fr.md @@ -5,7 +5,7 @@ title: Webpy + LightTTPD avec FastCGi # Webpy + LightTTPD avec FastCGi -Autre langages: [english](/../fastcgi-lighttpd) | ... +Autre langages: [English](/../fastcgi-lighttpd) | ... ## Problème: diff --git a/cookbook/fastcgi-lighttpd.md b/cookbook/fastcgi-lighttpd.md index 95fcbaa7..13c68820 100644 --- a/cookbook/fastcgi-lighttpd.md +++ b/cookbook/fastcgi-lighttpd.md @@ -5,7 +5,7 @@ title: Webpy + LightTTPD with FastCGi # Webpy + LightTTPD with FastCGi -Other languages: [français](/../cookbook/fastcgi-lighttpd.fr) | ... +Other languages: [Français](/../cookbook/fastcgi-lighttpd.fr) | ... *If you have problems with this recipe read this [thread](http://www.mail-archive.com/webpy@googlegroups.com/msg02800.html)* diff --git a/cookbook/fileupload.fr.md b/cookbook/fileupload.fr.md index eb808d14..f34bc752 100644 --- a/cookbook/fileupload.fr.md +++ b/cookbook/fileupload.fr.md @@ -5,7 +5,7 @@ title: Uploader un fichier # Uploader un fichier -Autre langages: [english](/../fileupload) | ... +Autre langages: [English](/../fileupload) | ... ## Problème: diff --git a/cookbook/fileupload.md b/cookbook/fileupload.md index 0f78e936..49fedfe7 100644 --- a/cookbook/fileupload.md +++ b/cookbook/fileupload.md @@ -5,7 +5,7 @@ title: File Upload Recipe # File Upload Recipe -Other languages: [français](/../cookbook/fileupload.fr) | ... +Other languages: [Français](/../cookbook/fileupload.fr) | ... ## Problem diff --git a/cookbook/forms.fr.md b/cookbook/forms.fr.md index 1322efc0..27639f7c 100644 --- a/cookbook/forms.fr.md +++ b/cookbook/forms.fr.md @@ -5,7 +5,7 @@ title: Comment utiliser les formulaires # Comment utiliser les formulaires -Autre langages: [english](/../forms) | ... +Autre langages: [English](/../forms) | ... ## Problème: diff --git a/cookbook/forms.md b/cookbook/forms.md index 64173c0b..be85510b 100644 --- a/cookbook/forms.md +++ b/cookbook/forms.md @@ -5,7 +5,7 @@ title: How to use forms # How to use forms -Other languages: [français](/../cookbook/forms.fr) | ... +Other languages: [Français](/../cookbook/forms.fr) | ... ## Problem diff --git a/cookbook/helloworld.fr.md b/cookbook/helloworld.fr.md index 186e56f9..af1c2152 100644 --- a/cookbook/helloworld.fr.md +++ b/cookbook/helloworld.fr.md @@ -5,7 +5,7 @@ title: Hello World! # Hello World! -Autre langages : [english](/../helloworld) | ... +Autre langages: [English](/../helloworld) | ... ## Probleme diff --git a/cookbook/helloworld.md b/cookbook/helloworld.md index 58faf991..5eff59cf 100644 --- a/cookbook/helloworld.md +++ b/cookbook/helloworld.md @@ -5,7 +5,7 @@ title: Hello World! # Hello World! -Other languages : [français](/helloworld.fr) | ... +Other languages: [Français](/helloworld.fr) | ... ## Problem diff --git a/cookbook/index.fr.md b/cookbook/index.fr.md index 7829d6d8..af2b5e5c 100644 --- a/cookbook/index.fr.md +++ b/cookbook/index.fr.md @@ -5,7 +5,7 @@ title: Web.py Cookbook # Web.py Cookbook -Autres langages : [japan 日本語](/ja) | [chinese 简体中文](/zh-cn) | [english](/../cookbook) | ... +Autres langages: [Japan 日本語](/ja) | [Chinese 简体中文](/zh-cn) | [English](/../cookbook) | ... Documentation de type Cookbook pour web.py 0.3. Veuillez noter que certaines de ces fonctions ne sont pas disponibles dans les versions précedentes. La version actuelle 0.3 est la branche développement. diff --git a/cookbook/input.fr.md b/cookbook/input.fr.md index d5210cd3..d55c940d 100644 --- a/cookbook/input.fr.md +++ b/cookbook/input.fr.md @@ -5,7 +5,7 @@ title: Accéder aux entrées utilisateurs par le biais de web.input # Accéder aux entrées utilisateurs par le biais de web.input -Autre langages: [english](/../input) | ... +Autre langages: [English](/../input) | ... ### Problème: diff --git a/cookbook/input.md b/cookbook/input.md index 579d7411..98f56a76 100644 --- a/cookbook/input.md +++ b/cookbook/input.md @@ -5,7 +5,7 @@ title: web.input # web.input -Other languages: [français](/../cookbook/input.fr) | ... +Other languages: [Français](/../cookbook/input.fr) | ... ## web.input diff --git a/cookbook/layout_template.fr.md b/cookbook/layout_template.fr.md index de6cb637..2cf937d7 100644 --- a/cookbook/layout_template.fr.md +++ b/cookbook/layout_template.fr.md @@ -5,7 +5,7 @@ title: Mise en page selon un gabarit # Mise en page selon un gabarit -Autres langages : [english](/../layout_template) | ... +Autres langages: [English](/../layout_template) | ... ### Problème diff --git a/cookbook/layout_template.md b/cookbook/layout_template.md index 20ac07bb..5c5270f8 100644 --- a/cookbook/layout_template.md +++ b/cookbook/layout_template.md @@ -5,7 +5,7 @@ title: Site Layout Template # Site Layout Template -Other languages : [français](/layout_template.fr) | ... +Other languages: [Français](/layout_template.fr) | ... ### Problem diff --git a/cookbook/limiting_upload_size.fr.md b/cookbook/limiting_upload_size.fr.md index 652fe4a9..a34a0067 100644 --- a/cookbook/limiting_upload_size.fr.md +++ b/cookbook/limiting_upload_size.fr.md @@ -5,7 +5,7 @@ title: Comment limiter la taille des fichiers uploadés # Comment limiter la taille des fichiers uploadés -Autre langages: [english](/../limiting_upload_size) | ... +Autre langages: [English](/../limiting_upload_size) | ... ## Problème: diff --git a/cookbook/limiting_upload_size.md b/cookbook/limiting_upload_size.md index eef69810..0bc9ed0c 100644 --- a/cookbook/limiting_upload_size.md +++ b/cookbook/limiting_upload_size.md @@ -5,7 +5,7 @@ title: How to put a limit on upload size # How to put a limit on upload size -Other languages: [français](/../cookbook/limiting_upload_size.fr) | ... +Other languages: [Français](/../cookbook/limiting_upload_size.fr) | ... ## Problem diff --git a/cookbook/logging.fr.md b/cookbook/logging.fr.md index 4b317f81..eb4bb379 100644 --- a/cookbook/logging.fr.md +++ b/cookbook/logging.fr.md @@ -5,7 +5,7 @@ title: Contrôler les évènements sur le serveur intégré par défaut # Contrôler les évènements sur le serveur intégré par défaut -Autre langages: [english](/../logging) | ... +Autre langages: [English](/../logging) | ... ## Problème: diff --git a/cookbook/logging.md b/cookbook/logging.md index 7af8f8df..0b27e8b7 100644 --- a/cookbook/logging.md +++ b/cookbook/logging.md @@ -5,7 +5,7 @@ title: Logging # Logging -Other languages: [français](/../cookbook/logging.fr) | ... +Other languages: [Français](/../cookbook/logging.fr) | ... ## Problem: diff --git a/cookbook/postbasic.fr.md b/cookbook/postbasic.fr.md index 78f9de85..e399d4c9 100644 --- a/cookbook/postbasic.fr.md +++ b/cookbook/postbasic.fr.md @@ -5,7 +5,7 @@ title: Lire les données brutes d un post # Lire les données brutes d un post -Autres langages [english](/../postbasic) | ... +Autres langages: [English](/../postbasic) | ... ## Probleme: diff --git a/cookbook/postbasic.md b/cookbook/postbasic.md index c49824eb..d2309b00 100644 --- a/cookbook/postbasic.md +++ b/cookbook/postbasic.md @@ -5,7 +5,7 @@ title: Reading raw data from post # Reading raw data from post -Other languages: [français](/../cookbook/postbasic.fr) | ... +Other languages: [Français](/../cookbook/postbasic.fr) | ... ## Introduction diff --git a/cookbook/redirect+seeother.fr.md b/cookbook/redirect+seeother.fr.md index 35a2af5f..4b4ce71f 100644 --- a/cookbook/redirect+seeother.fr.md +++ b/cookbook/redirect+seeother.fr.md @@ -5,7 +5,7 @@ title: web.redirect et web.seeother # web.redirect et web.seeother -Autres langages [english](/../redirect+seeother/) | ... +Autres langages: [English](/../redirect+seeother/) | ... ### Probleme diff --git a/cookbook/redirect+seeother.md b/cookbook/redirect+seeother.md index 257675e3..0e309554 100644 --- a/cookbook/redirect+seeother.md +++ b/cookbook/redirect+seeother.md @@ -5,7 +5,7 @@ title: web.redirect and web.seeother # web.redirect and web.seeother -Other languages: [français](/../cookbook/redirect+seeother.fr) | ... +Other languages: [Français](/../cookbook/redirect+seeother.fr) | ... ## web.redirect and web.seeother diff --git a/cookbook/sendmail_using_gmail.fr.md b/cookbook/sendmail_using_gmail.fr.md index 36b1a143..873e111b 100644 --- a/cookbook/sendmail_using_gmail.fr.md +++ b/cookbook/sendmail_using_gmail.fr.md @@ -5,7 +5,7 @@ title: Envoi de mails en utilisant Gmail # Envoi de mails en utilisant Gmail -Autre langages: [english](/../sendmail_using_gmail) | ... +Autre langages: [English](/../sendmail_using_gmail) | ... ## Problème: diff --git a/cookbook/sendmail_using_gmail.md b/cookbook/sendmail_using_gmail.md index 63d99a7b..ecd0346b 100644 --- a/cookbook/sendmail_using_gmail.md +++ b/cookbook/sendmail_using_gmail.md @@ -5,7 +5,7 @@ title: Sending mail using gmail # Sending mail using gmail -Other languages: [français](/../cookbook/sendmail_using_gmail.fr) | ... +Other languages: [Français](/../cookbook/sendmail_using_gmail.fr) | ... ## Problem: diff --git a/cookbook/session_in_template.fr.md b/cookbook/session_in_template.fr.md index 9addd110..68de85bd 100644 --- a/cookbook/session_in_template.fr.md +++ b/cookbook/session_in_template.fr.md @@ -5,7 +5,7 @@ title: Utiliser session dans les gabarits # Utiliser session dans les gabarits -Autre langages: [english](/../session_in_template) | ... +Autre langages: [English](/../session_in_template) | ... ## Problème: diff --git a/cookbook/session_in_template.md b/cookbook/session_in_template.md index 0758dad3..a64ff35e 100644 --- a/cookbook/session_in_template.md +++ b/cookbook/session_in_template.md @@ -5,7 +5,7 @@ title: Using session in template # Using session in template -Other languages: [français](/../cookbook/session_in_template.fr) | ... +Other languages: [Français](/../cookbook/session_in_template.fr) | ... ## Problem: diff --git a/cookbook/session_with_reloader.fr.md b/cookbook/session_with_reloader.fr.md index bec15b56..11c367cb 100644 --- a/cookbook/session_with_reloader.fr.md +++ b/cookbook/session_with_reloader.fr.md @@ -5,7 +5,7 @@ title: Utiliser les sessions avec reloader # Utiliser les sessions avec reloader -Autre langages: [english](./session_with_reloader) | ... +Autre langages: [English](./session_with_reloader) | ... # Probleme diff --git a/cookbook/session_with_reloader.md b/cookbook/session_with_reloader.md index cc0b9c13..45a0948a 100644 --- a/cookbook/session_with_reloader.md +++ b/cookbook/session_with_reloader.md @@ -5,7 +5,7 @@ title: Using session with reloader # Using session with reloader -Other languages: [français](/../cookbook/session_with_reloader.fr) | ... +Other languages: [Français](/../cookbook/session_with_reloader.fr) | ... # Problem diff --git a/cookbook/sessions.fr.md b/cookbook/sessions.fr.md index 7ce0974a..c3961879 100644 --- a/cookbook/sessions.fr.md +++ b/cookbook/sessions.fr.md @@ -5,7 +5,7 @@ title: Travailler avec les sessions # Travailler avec les sessions -Autre langages: [english](/../sessions) | ... +Autre langages: [English](/../sessions) | ... ### Problème diff --git a/cookbook/sessions.md b/cookbook/sessions.md index 89262ea0..51fc0bbb 100644 --- a/cookbook/sessions.md +++ b/cookbook/sessions.md @@ -5,7 +5,7 @@ title: Sessions # Sessions -Other languages: [français](./sessions.fr) | ... +Other languages: [Français](./sessions.fr) | ... ### Problem diff --git a/cookbook/sessions_with_subapp.fr.md b/cookbook/sessions_with_subapp.fr.md index 199e9d17..d7385b2d 100644 --- a/cookbook/sessions_with_subapp.fr.md +++ b/cookbook/sessions_with_subapp.fr.md @@ -5,7 +5,7 @@ title: Utiliser les sessions avec les sous-applications # Utiliser les sessions avec les sous-applications -Autre langages: [english](/../sessions_with_subapp) | ... +Autre langages: [English](/../sessions_with_subapp) | ... ### Note diff --git a/cookbook/sessions_with_subapp.md b/cookbook/sessions_with_subapp.md index 7514bbbd..c1b0ef1c 100644 --- a/cookbook/sessions_with_subapp.md +++ b/cookbook/sessions_with_subapp.md @@ -5,7 +5,7 @@ title: Sessions with Sub-apps # Sessions with Sub-apps -Other languages: [français](/../cookbook/sessions_with_subapp.fr) | ... +Other languages: [Français](/../cookbook/sessions_with_subapp.fr) | ... ### Note *This solutions is taken from [this](http://www.mail-archive.com/webpy@googlegroups.com/msg02557.html) post on the web.py mailing list.* diff --git a/cookbook/ssl.fr.md b/cookbook/ssl.fr.md index 15570ed3..d26442d4 100644 --- a/cookbook/ssl.fr.md +++ b/cookbook/ssl.fr.md @@ -5,7 +5,7 @@ title: Configurer le support SSL dans le serveur intégré # Configurer le support SSL dans le serveur intégré -Autre langages: [english](/../ssl) | ... +Autre langages: [English](/../ssl) | ... ## Probleme diff --git a/cookbook/ssl.md b/cookbook/ssl.md index a2261352..0fc656e2 100644 --- a/cookbook/ssl.md +++ b/cookbook/ssl.md @@ -5,7 +5,7 @@ title: SSL support in built-in cherrypy server # SSL support in built-in cherrypy server -Other languages: [français](/../cookbook/ssl.fr) | ... +Other languages: [Français](/../cookbook/ssl.fr) | ... ## Problem diff --git a/cookbook/staticfiles.fr.md b/cookbook/staticfiles.fr.md index a6d5311c..3ec1cf33 100644 --- a/cookbook/staticfiles.fr.md +++ b/cookbook/staticfiles.fr.md @@ -5,7 +5,7 @@ title: Servir des fichiers statiques (tels que .js, .css et des images) # Servir des fichiers statiques (tels que .js, .css et des images) -Autre langages : [english](/../staticfiles) | ... +Autre langages: [English](/../staticfiles) | ... Probleme ------- diff --git a/cookbook/staticfiles.md b/cookbook/staticfiles.md index 92157054..9bc04398 100644 --- a/cookbook/staticfiles.md +++ b/cookbook/staticfiles.md @@ -5,7 +5,7 @@ title: Serving Static Files (such as js, css and images) # Serving Static Files (such as js, css and images) -Other languages : [français](/staticfiles.fr) | ... +Other languages: [Français](/staticfiles.fr) | ... # Problem diff --git a/cookbook/storeupload.fr.md b/cookbook/storeupload.fr.md index cf21fb4a..b640fe8a 100644 --- a/cookbook/storeupload.fr.md +++ b/cookbook/storeupload.fr.md @@ -5,7 +5,7 @@ title: Stocker un fichier uploadé # Stocker un fichier uploadé -Autre langages: [english](/../storeupload) | ... +Autre langages: [English](/../storeupload) | ... ## Problème diff --git a/cookbook/storeupload.md b/cookbook/storeupload.md index b566d0f0..df0f22cf 100644 --- a/cookbook/storeupload.md +++ b/cookbook/storeupload.md @@ -5,7 +5,7 @@ title: Store an uploaded file # Store an uploaded file -Other languages: [français](/../cookbook/storeupload/fr) | ... +Other languages: [Français](/../cookbook/storeupload/fr) | ... ## Problem diff --git a/cookbook/streaming_large_files.fr.md b/cookbook/streaming_large_files.fr.md index 40a5b694..cb3ec7ff 100644 --- a/cookbook/streaming_large_files.fr.md +++ b/cookbook/streaming_large_files.fr.md @@ -5,7 +5,7 @@ title: Comment streamer de gros fichiers # Comment streamer de gros fichiers -Autre langages: [english](/../streaming_large_files) | ... +Autre langages: [English](/../streaming_large_files) | ... ## Problème: diff --git a/cookbook/streaming_large_files.md b/cookbook/streaming_large_files.md index ce36d7c7..aa5616ee 100644 --- a/cookbook/streaming_large_files.md +++ b/cookbook/streaming_large_files.md @@ -5,7 +5,7 @@ title: How to Stream Large Files # How to Stream Large Files -Other languages: [français](/../cookbook/streaming_large_files.fr) | ... +Other languages: [Français](/../cookbook/streaming_large_files.fr) | ... ## Problem diff --git a/cookbook/subapp.fr.md b/cookbook/subapp.fr.md index 0187dada..d1b4a09f 100644 --- a/cookbook/subapp.fr.md +++ b/cookbook/subapp.fr.md @@ -5,7 +5,7 @@ title: Utiliser les sous-applications # Utiliser les sous-applications -Autre langages: [english](/../subapp) | ... +Autre langages: [English](/../subapp) | ... ## Probleme diff --git a/cookbook/subapp.md b/cookbook/subapp.md index dc9e1ae4..15ba1b21 100644 --- a/cookbook/subapp.md +++ b/cookbook/subapp.md @@ -5,7 +5,7 @@ title: using subapplications # using subapplications -Other languages [français](/../cookbook/subapp.fr) | ... +Other languages: [Français](/../cookbook/subapp.fr) | ... ## Problem diff --git a/cookbook/url_handling.fr.md b/cookbook/url_handling.fr.md index 0a7187d4..8c0cc1be 100644 --- a/cookbook/url_handling.fr.md +++ b/cookbook/url_handling.fr.md @@ -5,7 +5,7 @@ title: Comprendre la gestion des urls # Comprendre la gestion des urls -Autres langages [english](/../url_handling) | ... +Autres langages: [English](/../url_handling) | ... ## Probleme: Comment conçevoir un gestionnaire d'url / distribuer un schéma pour l'ensemble du site diff --git a/cookbook/url_handling.md b/cookbook/url_handling.md index 69e59d9c..f4e1085a 100644 --- a/cookbook/url_handling.md +++ b/cookbook/url_handling.md @@ -5,7 +5,7 @@ title: Understanding URL Handling # Understanding URL Handling -Other languages : [français](./url_handling.fr) | ... +Other languages: [Français](./url_handling.fr) | ... ## Problem: how to design a url handling / dispatching scheme for the entire site diff --git a/cookbook/userauth.fr.md b/cookbook/userauth.fr.md index c66f8d14..f6a46f4a 100644 --- a/cookbook/userauth.fr.md +++ b/cookbook/userauth.fr.md @@ -5,7 +5,7 @@ title: Authentification des utilisateurs # Authentification des utilisateurs -Autres langages : [english](/../userauth) | ... +Autres langages: [English](/../userauth) | ... ## Problème diff --git a/cookbook/userauth.md b/cookbook/userauth.md index ea42b5b1..973e4afa 100644 --- a/cookbook/userauth.md +++ b/cookbook/userauth.md @@ -7,7 +7,7 @@ title: user authentication #I'm still working on this page, please no body else edit -Other languages : [français](/userauth.fr) | ... +Other languages: [Français](/userauth.fr) | ... ## Problem diff --git a/cookbook/xmlfiles.fr.md b/cookbook/xmlfiles.fr.md index bdadb13f..5e347948 100644 --- a/cookbook/xmlfiles.fr.md +++ b/cookbook/xmlfiles.fr.md @@ -5,7 +5,7 @@ title: Servir du XML # Servir du XML -Autres langages [english](/../xmlfiles) | ... +Autres langages: [English](/../xmlfiles) | ... ### Probleme diff --git a/cookbook/xmlfiles.md b/cookbook/xmlfiles.md index cd68db2d..5d709ed0 100644 --- a/cookbook/xmlfiles.md +++ b/cookbook/xmlfiles.md @@ -5,7 +5,7 @@ title: Serving XML # Serving XML -Other languages: [français](/../cookbook/xmlfiles.fr) | ... +Other languages: [Français](/../cookbook/xmlfiles.fr) | ... ### Problem diff --git a/docs/0.2/tutorial2.md b/docs/0.2/tutorial2.md index efa30a51..34315434 100644 --- a/docs/0.2/tutorial2.md +++ b/docs/0.2/tutorial2.md @@ -5,7 +5,7 @@ title: web.py 0.2 tutorial # web.py 0.2 tutorial -* [english](./tutorial2) +* [English](./tutorial2) * [简体中文](http://www.dup2.org/files/web.py%200.2%20tutorial.html) * [Español](./tutorial2.es) * [Português (Brasil)](./tutorial2.pt-br) diff --git a/docs/0.3.fr/index.md b/docs/0.3.fr/index.md index 65a66536..a9d1ed98 100644 --- a/docs/0.3.fr/index.md +++ b/docs/0.3.fr/index.md @@ -5,7 +5,7 @@ title: Documentation de web.py 0.3 # Documentation de web.py 0.3 -Autre langages : [english](/docs/0.3) | ... +Autre langages: [English](/docs/0.3) | ... ## Installation * [Installation](/install/fr). Installer web.py, configurer LightTPD, Apache, Nginx ...(CGI, FastCgi, ...) diff --git a/docs/0.3/app_processors.fr.md b/docs/0.3/app_processors.fr.md index 8739ce86..94998744 100644 --- a/docs/0.3/app_processors.fr.md +++ b/docs/0.3/app_processors.fr.md @@ -5,7 +5,7 @@ title: Application processors # Application processors -Autres langues : [english](/../app_processors) | ... +Autres langues : [English](/../app_processors) | ... les Application processors permettent au programmeur d'executer du code commun avant que chaque requête soit traitée. Ceci est utile pour les schémas d'authentification ou pour organiser l'état des utilisateurs à chaque requête. Des processors multiples peuvent être ajoutés par application, et ils seront executés dans l'ordre ou ils ont été ajoutés. Le plus basique processor ressemble à ça: diff --git a/docs/0.3/app_processors.md b/docs/0.3/app_processors.md index 92460199..394fb06e 100644 --- a/docs/0.3/app_processors.md +++ b/docs/0.3/app_processors.md @@ -5,7 +5,7 @@ title: Application processors # Application processors -Other languages : [français](/app_processors/fr) | ... +Other languages: [Français](/app_processors/fr) | ... Application processors allow the programmer to execute common code before each request is processed. This is helpful for authentication schemes or for setting up user state on each request. Multiple processors can be added per application, and they will be executed in the order which they are added. The most basic processor looks like this: diff --git a/docs/0.3/apps.fr.md b/docs/0.3/apps.fr.md index e98a7141..2e026320 100644 --- a/docs/0.3/apps.fr.md +++ b/docs/0.3/apps.fr.md @@ -5,7 +5,7 @@ title: Applications webpy # Applications webpy -Autres langages : [english](/../apps) | ... +Autres langages: [English](/../apps) | ... Les Applications webpy apparient les urls et les traitements qui sont mappés vers elles. Elles se répartissent en plusieurs catégories: diff --git a/docs/0.3/apps/auto.fr.md b/docs/0.3/apps/auto.fr.md index 33321672..a7b66ce5 100644 --- a/docs/0.3/apps/auto.fr.md +++ b/docs/0.3/apps/auto.fr.md @@ -5,7 +5,7 @@ title: Auto Application # Auto Application -Autre langages : [english](/docs/0.3/apps/auto) | ... +Autre langages: [English](/docs/0.3/apps/auto) | ... L'auto application agit comme la [basic application](/docs/0.3/apps/basic/fr), seulement il ne nécessite pas un mapping d'url pour être créé. Le mapping est dérivé des noms de classe (utilisant les métaclasses). Dans sa forme la plus basique : diff --git a/docs/0.3/apps/auto.md b/docs/0.3/apps/auto.md index 9b2c05b0..1605c64a 100644 --- a/docs/0.3/apps/auto.md +++ b/docs/0.3/apps/auto.md @@ -5,7 +5,7 @@ title: Auto Application # Auto Application -Other languages : [français](/docs/0.3/apps/auto/fr) | ... +Other languages: [Français](/docs/0.3/apps/auto/fr) | ... The auto application acts like the [basic application](/docs/0.3/apps/basic), only it doesn't require a URL mapping to be created. The mapping is derived from the class names (using metaclasses). In it's most basic form: diff --git a/docs/0.3/apps/basic.fr.md b/docs/0.3/apps/basic.fr.md index a33b88f0..aa8dd4a4 100644 --- a/docs/0.3/apps/basic.fr.md +++ b/docs/0.3/apps/basic.fr.md @@ -5,7 +5,7 @@ title: Basic Application # Basic Application -Autres langages : [français](/../basic) | ... +Autres langages: [Français](/../basic) | ... La basic application définit un appariement des urls à des mappings de classe. Dans l'exemple ci-dessous, les variables URL définissent un appariement d'une expression régulière à un nom de classe. diff --git a/docs/0.3/apps/basic.md b/docs/0.3/apps/basic.md index ce6b2cdd..cfe31fff 100644 --- a/docs/0.3/apps/basic.md +++ b/docs/0.3/apps/basic.md @@ -5,7 +5,7 @@ title: Basic Application # Basic Application -Other languages : [français](/docs/0.3/apps/basic/fr) | ... +Other languages: [Français](/docs/0.3/apps/basic/fr) | ... The basic application defines a pairing of urls to class mappings. In the example below, the urls variable defines a pairing of a regular expression to a class name. diff --git a/docs/0.3/apps/index.md b/docs/0.3/apps/index.md index 0f47b9c5..1f1aa122 100644 --- a/docs/0.3/apps/index.md +++ b/docs/0.3/apps/index.md @@ -5,7 +5,7 @@ title: webpy Applications # webpy Applications -Other languages : [français](/docs/0.3/apps/fr) | ... +Other languages: [Français](/docs/0.3/apps/fr) | ... webpy applications encompass the urls and handlers that map to them. They fall into several categories: diff --git a/docs/0.3/index.md b/docs/0.3/index.md index e1a7f64a..3e41ace7 100644 --- a/docs/0.3/index.md +++ b/docs/0.3/index.md @@ -5,7 +5,7 @@ title: web.py 0.3 documentation # web.py 0.3 documentation -Other languages : [français](/docs/0.3.fr) | ... +Other languages: [Français](/docs/0.3.fr) | ... ## Install * [Install](/install). Install web.py, configure LightTPD, Apache, Nginx ...(CGI, FastCgi, ...) diff --git a/docs/0.3/sessions.fr.md b/docs/0.3/sessions.fr.md index 65be91f5..23cfb3bd 100644 --- a/docs/0.3/sessions.fr.md +++ b/docs/0.3/sessions.fr.md @@ -5,7 +5,7 @@ title: Les sessions web.py # Les sessions web.py -Autres langages : [english](/../sessions) | ... +Autres langages: [English](/../sessions) | ... Les sessions sont un moyen de stocker des informations entre les requêtes, faisant ainsi du http un protocole avec état. Elles fonctionnent en envoyant à l'utilisateur un cookie, qui mappe vers un objet de stockage de session sur le serveur. Lorsque l'utilisateur fait une requête vers une page, le client renvoie le cookie avec la requête, web.py charge la session basée sur sa clef, et le code peut demander et stocker des informations dedans. diff --git a/docs/0.3/sessions.md b/docs/0.3/sessions.md index 1fd542d5..0532a6e3 100644 --- a/docs/0.3/sessions.md +++ b/docs/0.3/sessions.md @@ -5,7 +5,7 @@ title: web.py Sessions # web.py Sessions -Other languages : [français](/sessions/fr) | ... +Other languages: [Français](/sessions/fr) | ... Sessions are a way to store information between requests, thereby making http stateful. They work by sending the user a cookie, which maps to a session storage object on the server. When the user requests a page, the client sends the cookie back with the request, web.py loads the session based on the key, and code can request and store information in it. diff --git a/docs/0.3/templetor.md b/docs/0.3/templetor.md index 49dd09e9..686e5f2f 100644 --- a/docs/0.3/templetor.md +++ b/docs/0.3/templetor.md @@ -5,7 +5,7 @@ title: Templetor - The web.py templating system # Templetor: The web.py templating system -Other languages : [français](/docs/0.3/templetor.fr) | ... +Other languages: [Français](/docs/0.3/templetor.fr) | ... ## Summary diff --git a/docs/0.3/tutorial.fr.md b/docs/0.3/tutorial.fr.md index 55fb3c19..b1f2b906 100644 --- a/docs/0.3/tutorial.fr.md +++ b/docs/0.3/tutorial.fr.md @@ -5,7 +5,7 @@ title: web.py 0.3 tutorial # web.py 0.3 tutorial -Autre langages : [english](./tutorial) | [chinese](./tutorial.zh-cn) +Autre langages: [English](./tutorial) | [Chinese](./tutorial.zh-cn) # Sommaire diff --git a/docs/0.3/tutorial.md b/docs/0.3/tutorial.md index db8d3a6f..5442106b 100644 --- a/docs/0.3/tutorial.md +++ b/docs/0.3/tutorial.md @@ -5,7 +5,7 @@ title: Tutorial # Tutorial -Other languages : [chinese 简体中文 ](/docs/0.3/tutorial.zh-cn) | [français](/docs/0.3/tutorial.fr) | [Bahasa Indonesia](/docs/0.3/tutorial.id) | ... +Other languages: [Chinese 简体中文 ](/docs/0.3/tutorial.zh-cn) | [Français](/docs/0.3/tutorial.fr) | [Bahasa Indonesia](/docs/0.3/tutorial.id) | ... ## Summary diff --git a/download.fr.md b/download.fr.md index b6cca82c..5c329114 100644 --- a/download.fr.md +++ b/download.fr.md @@ -5,7 +5,7 @@ title: Téléchargement # Téléchargement -Autre langages : [english](/download) | ... +Autre langages: [English](/download) | ... ## Obtenir la dernière version stable diff --git a/download.md b/download.md index deba58a3..cd27e24f 100644 --- a/download.md +++ b/download.md @@ -5,7 +5,7 @@ title: Download # Download -Other languages : [français](/download/fr) | ... +Other languages: [Français](/download/fr) | ... ## Get the latest stable version The easiest way to install web.py is using [easy_install](http://peak.telecommunity.com/DevCenter/EasyInstall): diff --git a/index.es.md b/index.es.md index 68f9a506..cacfde99 100644 --- a/index.es.md +++ b/index.es.md @@ -3,7 +3,7 @@ layout: default title: ¡Bienvenido a web.py! --- -Other langages : [Inglés](/index.html) | [Francés](/index.fr.html) | ... +Other langages: [Inglés](/index.html) | [Francés](/index.fr.html) | ... ## Acerca de web.py diff --git a/index.fr.md b/index.fr.md index c65e4750..7320355f 100644 --- a/index.fr.md +++ b/index.fr.md @@ -5,7 +5,7 @@ title: A propos de Web.py # A propos de Web.py -Autre langages : [english](/) | [Español](/index.es.html) | ... +Autre langages: [English](/) | [Español](/index.es.html) | ... **web.py** est un framework pour python qui est aussi simple qu'il est puissant. Web.py est dans le domaine publique; vous pouvez l'utiliser à toutes fins sans aucunes restrictions. diff --git a/index.md b/index.md index d2cbb5be..a3f9a486 100644 --- a/index.md +++ b/index.md @@ -3,7 +3,7 @@ layout: default title: Welcome to web.py! --- -Other langages : [French](/index.fr.html) | [Español](/index.es.html) | ... +Other langages: [Français](/index.fr.html) | [Español](/index.es.html) | ... ## About web.py diff --git a/install.es.md b/install.es.md index 3f1d4f5e..f99723af 100644 --- a/install.es.md +++ b/install.es.md @@ -5,7 +5,7 @@ title: Guía de instalación # Guía de instalación -Otros idiomas : [english](/install) | [Japan 日本語 ](/install.ja) | [chinese 简体中文 ](/install.zh-cn) | [italiano](/install.it) | [français](/install.fr) | [Serbo-Croatian](http://science.webhostinggeeks.com/webpy-vodic-za-instalaciju) +Otros idiomas : [English](/install) | [Japan 日本語 ](/install.ja) | [Chinese 简体中文 ](/install.zh-cn) | [Italiano](/install.it) | [Français](/install.fr) | [Serbo-Croatian](http://science.webhostinggeeks.com/webpy-vodic-za-instalaciju) ## Índice diff --git a/install.fr.md b/install.fr.md index ad8ef6aa..82d0d682 100644 --- a/install.fr.md +++ b/install.fr.md @@ -5,7 +5,7 @@ title: Installation # Installation -Autre langages : [español](/install/es) | [Japan](/install/ja) | [chinese](/install/zh-cn) | [italiano](/install/it) | [english](/install) +Autre langages: [Español](/install/es) | [Japan](/install/ja) | [Chinese](/install/zh-cn) | [Italiano](/install/it) | [English](/install) ## Sommaire diff --git a/install.md b/install.md index 032c71ea..1584c348 100644 --- a/install.md +++ b/install.md @@ -5,7 +5,7 @@ title: Install guide # Install guide -Other languages : [español](/install.es) | [Japan 日本語 ](/install.ja) | [chinese 简体中文 ](/install.zh-cn) | [italiano](/install.it) | [français](/install.fr) | [Serbo-Croatian](http://science.webhostinggeeks.com/webpy-vodic-za-instalaciju) +Other languages: [Español](/install.es) | [Japan 日本語 ](/install.ja) | [Chinese 简体中文 ](/install.zh-cn) | [Italiano](/install.it) | [Français](/install.fr) | [Serbo-Croatian](http://science.webhostinggeeks.com/webpy-vodic-za-instalaciju) ## Summary diff --git a/recommended_setup.fr.md b/recommended_setup.fr.md index e240e183..76538f61 100644 --- a/recommended_setup.fr.md +++ b/recommended_setup.fr.md @@ -5,7 +5,7 @@ title: Configuration recommandée # Configuration recommandée -Autre langages : [english](/recommended_setup) | ... +Autre langages: [English](/recommended_setup) | ... ### Sommaire diff --git a/recommended_setup.md b/recommended_setup.md index e65cfb32..f9e7f8b8 100644 --- a/recommended_setup.md +++ b/recommended_setup.md @@ -5,7 +5,7 @@ title: Recommended Setup # Recommended Setup -Other languages : [français](/recommended_setup/fr) | ... +Other languages: [Français](/recommended_setup/fr) | ... ### Summary From 80e483bd44b2fc8ba56a45174e952675526a7ef0 Mon Sep 17 00:00:00 2001 From: nattheriddle1 <69092489+nattheriddle1@users.noreply.github.com> Date: Wed, 3 Aug 2022 10:14:42 -0500 Subject: [PATCH 10/13] Added lines after Markdown headings Markdown headings should be followed by 1 blank line, especially before indented code blocks. --- cookbook/cookies.fr.md | 5 +++++ cookbook/cookies.md | 2 ++ cookbook/cookies.zh-cn.md | 3 +++ cookbook/ctx.fr.md | 2 ++ cookbook/ctx.md | 2 ++ cookbook/fastcgi-apache.zh-cn.md | 9 +++++++++ cookbook/fastcgi-lighttpd.fr.md | 2 ++ cookbook/fastcgi-lighttpd.md | 3 +++ cookbook/google_app_engine.md | 1 + cookbook/index.fr.md | 10 ++++++++++ cookbook/input.md | 2 ++ cookbook/input.zh-cn.md | 2 ++ cookbook/layout_template.fr.md | 2 ++ cookbook/layout_template.md | 3 +++ cookbook/layout_template.zh-cn.md | 3 +++ cookbook/mod_wsgi-apache-ubuntu.md | 1 + cookbook/mod_wsgi-apache.md | 1 + cookbook/multidbs.md | 1 + cookbook/multidbs.zh-cn.md | 1 + cookbook/redirect+seeother.md | 2 ++ cookbook/runtime-language-switch.md | 1 + cookbook/runtime-language-switch.zh-cn.md | 1 + cookbook/sessions_with_subapp.md | 2 ++ cookbook/ssl.md | 1 + cookbook/template_cheetah.md | 1 + cookbook/template_cheetah.zh-cn.md | 15 ++++++++------- cookbook/template_jinja.md | 1 + cookbook/template_mako.md | 4 ++++ cookbook/userauth.zh-cn.md | 3 ++- cookbook/userauthbasic.md | 3 +++ cookbook/userauthpgsql.md | 1 + docs/0.2/tutorial2.es.md | 1 + docs/0.2/tutorial2.fr.md | 2 ++ docs/0.3.fr/index.md | 2 ++ docs/0.3/app_processors.fr.md | 1 + docs/0.3/app_processors.md | 1 + docs/0.3/index.md | 2 ++ docs/0.3/sessions.fr.md | 1 + docs/0.3/sessions.md | 3 +++ docs/work.md | 3 +++ install.it.md | 1 + install.ja.md | 1 + templetor.md | 2 ++ 43 files changed, 102 insertions(+), 8 deletions(-) diff --git a/cookbook/cookies.fr.md b/cookbook/cookies.fr.md index 27ffa0cb..daf58d53 100644 --- a/cookbook/cookies.fr.md +++ b/cookbook/cookies.fr.md @@ -16,6 +16,7 @@ Comment déposer et récupérer les cookies d'un utilisateur qui navigue sur le Web.py permet d'une façon très simple d'utiliser les méthodes de dépot/récupération de cookies (setting/getting). ### Déposer des cookies + #### Vue d'ensemble setcookie(name, value, expires="", domain=None, secure=False): @@ -41,17 +42,21 @@ L'appel de la classe ci-dessus avec GET déposera un cookie nommé "age" ayant p Le troisième (et optionnel) argument de `web.setcookie()`, "expires", vous permet de définir quand vous voulez que votre cookie expire. Tout nombre négatif expirera le cookie immédiatement. Un nombre positif est le nombre de secondes durant lequel le cookie va durer (3600 se traduirait en une heure de durée du cookie). Laisser cet argument vide a pour conséquence, d'expirer le cookie session quand le navigateur s'arrête. Pour créer un cookie permanent, mettez à jour le temps d'expiration du cookie à intervalles réguliers (exemple : quand un utilisateur s'est connecté) ### Récuperer des cookies + #### Vue d'ensemble Il existe de nombreuses méthodes pour retrouver des cookies, en fonction de la réaction souhaitée à un cookie manquant. ##### Méthode 1 (Renvoi None si le cookie n'est pas trouvé): + web.cookies().get(cookieName) #cookieName est le nom du cookie présenté par le navigateur ##### Méthode 2 (Lève une exception AttributeError si le cookie n'est pas trouvé): + foo = web.cookies() foo.cookieName ##### Méthode 3 (Evite la levée d'exception en attribuant une valeur par défaut au cookie qui n'a pas été trouvé): + foo = web.cookies(cookieName=defaultValue) foo.cookieName # renvoi la valeur (qui pourrait être par défaut) #cookieName est le nom du cookie présenté par le navigateur diff --git a/cookbook/cookies.md b/cookbook/cookies.md index f87eea2c..fb9cfd08 100644 --- a/cookbook/cookies.md +++ b/cookbook/cookies.md @@ -16,6 +16,7 @@ You want to set and retrieve cookies for a user browsing the site. Web.py *comes* with an easy to use method for setting/getting cookies. ### Setting Cookies + #### Overview ``` @@ -46,6 +47,7 @@ Calling the above class with GET will set a cookie named `age` with a default va The third (and optional) argument to `web.setcookie()`, `expires`, allows you to set when you want your cookie to expire. Any negative number will expire the cookie immediately. Any positive number is the number of seconds that the cookie will last (3600 would result in an hour long cookie). Leaving this argument empty results in a session cookie, which expires when your browser shuts down. To make the cookie permanent, simply update cookie expiration time at regular interval (e.g. when user logged in). ### Retrieving Cookies + #### Overview There are many methods to retrieve cookies, depending on the desired reaction to a missing cookie. diff --git a/cookbook/cookies.zh-cn.md b/cookbook/cookies.zh-cn.md index 90e11f34..6fe9d33e 100644 --- a/cookbook/cookies.zh-cn.md +++ b/cookbook/cookies.zh-cn.md @@ -14,6 +14,7 @@ title: 如何操作Cookie 对web.py而言,设置/获取Cookie非常方便。 ### 设置 Cookies + #### 概述 setcookie(name, value, expires="", domain=None, secure=False): @@ -38,6 +39,7 @@ title: 如何操作Cookie `web.setcookie()`的第三个参数-"expires"是一个可选参数,它用来设定cookie过期的时间。如果是负数,cookie将立刻过期。如果是正数,就表示cookie的有效时间是多久,以秒为单位。如果该参数为空,cookie就永不过期。 ### 获得Cookies + #### 概述 获取Cookie的值有很多方法,它们的区别就在于找不到cookie时如何处理。 @@ -59,6 +61,7 @@ title: 如何操作Cookie #cookieName is the name of the cookie submitted by the browser #### 示例: + 用`web.cookies()` 访问cookie. 如果已经用`web.setcookie()`设置了Cookie, 就可以象下面这样获得Cookie: class CookieGet: diff --git a/cookbook/ctx.fr.md b/cookbook/ctx.fr.md index e7f9f728..64351b16 100644 --- a/cookbook/ctx.fr.md +++ b/cookbook/ctx.fr.md @@ -35,6 +35,7 @@ Données que l'on trouve dans 'ctx' ------------------- ### Request ### + * `environ` alias 'env' – un dictionnaire contenant les variables environnement standard de [WSGI](http://www.python.org/dev/peps/pep-0333/#environ-variables) * `home` – le chemin de base pour l'application, y compris tout élément «consommée» par les applications extérieures *http://example.org/admin* * `homedomain` – ? (semble être le protocole + l'hôte) *http://example.org* @@ -49,6 +50,7 @@ Données que l'on trouve dans 'ctx' * `fullpath` alias 'path + query' – Le chemin demandé inclut les arguments de requête mais n'inclut *pas* 'homepath'. Exemple : */articles/845?fourlegs=good&twolegs=bad* ### Response ### + * `status` – Le code statut HTTP (par defaut '200 OK') *401 Unauthorized* * `headers` – Une liste de deux tuples contenant les en-têtes HTTP (headers) * `output` – Une chaîne contenant l'entité de réponse diff --git a/cookbook/ctx.md b/cookbook/ctx.md index b50368af..1b02bfe4 100644 --- a/cookbook/ctx.md +++ b/cookbook/ctx.md @@ -35,6 +35,7 @@ Data Found in `ctx` ------------------- ### Request ### + * `environ` a.k.a. `env` – a dictionary containing the standard [WSGI environment variables](http://www.python.org/dev/peps/pep-0333/#environ-variables) * `home` – the base path for the application, including any parts "consumed" by outer applications *http://example.org/admin* * `homedomain` – ? (appears to be protocol + host) *http://example.org* @@ -48,6 +49,7 @@ Data Found in `ctx` * `fullpath` a.k.a. `path + query` – the path requested *including* query arguments but *not* including `homepath`. E.g. */articles/845?fourlegs=good&twolegs=bad* ### Response ### + * `status` – the HTTP status code (default '200 OK') *401 Unauthorized* * `headers` – a list of 2-tuples containing HTTP headers * `output` – a string containing the response entity diff --git a/cookbook/fastcgi-apache.zh-cn.md b/cookbook/fastcgi-apache.zh-cn.md index fa6eb4f8..6a6abd92 100644 --- a/cookbook/fastcgi-apache.zh-cn.md +++ b/cookbook/fastcgi-apache.zh-cn.md @@ -6,6 +6,7 @@ title: Web.py using FastCGI and Apache 2 # Web.py using FastCGI and Apache 2 # Requirements + * Apache 2.x * [mod_fcgid](http://fastcgi.coremail.cn/) * [mod_rewrite](http://httpd.apache.org/docs/2.0/rewrite/) @@ -13,6 +14,7 @@ title: Web.py using FastCGI and Apache 2 Note, on CentOS compiling mod_fcgid requires apache-devel be installed (available via yum). # Apache Configuration + Replace '/var/www/myapp/' with the path to your apps directory LoadModule rewrite_module modules/mod_rewrite.so @@ -46,6 +48,7 @@ Replace '/var/www/myapp/' with the path to your apps directory # Hello World + Note the following line is required: web.wsgi.runwsgi = lambda func, addr=None: web.wsgi.runfcgi(func, addr) @@ -65,6 +68,7 @@ web.wsgi.runwsgi = lambda func, addr=None: web.wsgi.runfcgi(func, addr) app.run() # Run + 1. Start your server. 1. Open your application with your browser 1. To confirm your application is running try: @@ -80,9 +84,11 @@ web.wsgi.runwsgi = lambda func, addr=None: web.wsgi.runfcgi(func, addr)
## Common problems +
### File permissions. + You might see error code 255 in your logs. Ensure the directory is readable and that code. py is executable: @@ -91,9 +97,11 @@ chmod +x code.py ### 404 Not Found. + Is your Alias path correct in your apache configuration? ### Other problems + Web.py spawns http://0.0.0.0:8080, dies unexpectedly, or returns nothing. Did you add this line? @@ -102,4 +110,5 @@ Did you add this line? ``` # Misc + After updating your application you may need to restart your web server to see the changes. diff --git a/cookbook/fastcgi-lighttpd.fr.md b/cookbook/fastcgi-lighttpd.fr.md index bf2eebf4..b0988eae 100644 --- a/cookbook/fastcgi-lighttpd.fr.md +++ b/cookbook/fastcgi-lighttpd.fr.md @@ -17,6 +17,7 @@ Comment configurer [lighttpd](http://www.lighttpd.net/) sous Debian GNU/Linux ? Ce qui suit s'applique à la version 1.4.18 de lighttpd.* ### Note: + * Vous devez remplacer `code.py` par le nom de votre propre fichier. * `/path-to/webpy-app` que vous trouverez ci-dessous, concerne le chemin vers le répertoire contenant votre `code.py` * `/path-to/webpy-app/code.py` est le chemin complet de votre **fichier python** @@ -104,6 +105,7 @@ server.modules += ( "mod_rewrite" ) ``` ### `code.py` + En haut du fichier, ajoutez: ``` diff --git a/cookbook/fastcgi-lighttpd.md b/cookbook/fastcgi-lighttpd.md index 13c68820..156129ec 100644 --- a/cookbook/fastcgi-lighttpd.md +++ b/cookbook/fastcgi-lighttpd.md @@ -12,6 +12,7 @@ Other languages: [Français](/../cookbook/fastcgi-lighttpd.fr) | ... *The following applies on lighttpd version 1.4.18* ## Note: + * You may replace `code.py` with your own file name. * `/path-to/webpy-app` found below refers to the path to the directory contains your `code.py` * `/path-to/webpy-app/code.py` is the full path to your **python file** @@ -47,6 +48,7 @@ Enabling and disabling modules could be done by provided **For web py you should enable mod_fastcgi and mod_rewrite, thus run: `/usr/sbin/lighty-enable-mod` and supply `fastcgi` (mod_rewrite will be enabled within `10-fastcgi.conf` file as you will see in a moment).** ## Below are instructions for the following files: + * `/etc/lighttpd/lighttpd.conf` * `/etc/lighttpd/conf-available/10-fastcgi.conf` * `code.py` @@ -94,6 +96,7 @@ server.modules += ( "mod_rewrite" ) ``` ### `/code.py` + At the top of the file add: ``` diff --git a/cookbook/google_app_engine.md b/cookbook/google_app_engine.md index 375e9aac..8fbbbf55 100644 --- a/cookbook/google_app_engine.md +++ b/cookbook/google_app_engine.md @@ -17,6 +17,7 @@ This cookbook entry explains how to run web.py as a google app engine applicatio * [Google App Engine](https://developers.google.com/appengine/downloads#Google_App_Engine_SDK_for_Python) ### Notes + * The mechanisms for running GAE in python2.7 and 2.5 are different, change the app.yaml accordingly * code.py is the main file of your application (2.5) * code.app is the object that cointains the return value of gaerun() (2.7) diff --git a/cookbook/index.fr.md b/cookbook/index.fr.md index af2b5e5c..52aa8e9c 100644 --- a/cookbook/index.fr.md +++ b/cookbook/index.fr.md @@ -25,6 +25,7 @@ La version actuelle 0.3 est la branche développement. ------------------------------------------------- ## Basique: + * [Hello World](/helloworld/fr). * [Servir des fichiers statiques](/staticfiles/fr). * [Comprendre la gestion des URLs](/url_handling/fr). @@ -34,6 +35,7 @@ La version actuelle 0.3 est la branche développement. * [Lire les données brutes d'un post](/postbasic/fr). ## Avancé + * [web.ctx](/ctx/fr). * [Application processors, charger et décharger des hooks](/application_processors/fr). * [Comment utiliser web.background](/background). - traduction demandée, voir [Todo](/docs/0.3.fr/todo) @@ -44,6 +46,7 @@ La version actuelle 0.3 est la branche développement. * [Run-time language switch](/runtime-language-switch). - traduction demandée, voir [Todo](/docs/0.3.fr/todo) ## Sessions et état des utilisateurs: + * [Travailler avec les sessions](/sessions/fr). * [Utiliser session avec reloader](/session_with_reloader/fr). * [Utiliser session dans les gabarits](/session_in_template/fr). @@ -53,11 +56,13 @@ La version actuelle 0.3 est la branche développement. * [Utiliser les sessions avec les sous-applications](/sessions_with_subapp/fr). ## Utils: + * [Envoi de Mail](/sendmail). - traduction demandée, voir [Todo](/docs/0.3.fr/todo) * [Envoi de Mail en utilisant Gmail](/sendmail_using_gmail/fr). * [Webservice en utilisant soaplib + WSDL](/webservice). - traduction demandée, voir [Todo](/docs/0.3.fr/todo) ## Modèles de mise en forme, gabarits de mise en page: + * [Templetor: le système de gabarits de web.py](/docs/0.3/templetor.fr ) * [Mise en page selon un gabarit](/layout_template/fr). * [Alterner un style](/alternating_style). - traduction demandée, voir [Todo](/docs/0.3.fr/todo) @@ -69,10 +74,12 @@ La version actuelle 0.3 est la branche développement. * [Comment utiliser les gabarits sur Google App Engine](/templates_on_gae). - traduction demandée, voir [Todo](/docs/0.3.fr/todo)) ## Essais: + * [Tester avec Paste et Nose](/testing_with_paste_and_nose). - traduction demandée, voir [Todo](/docs/0.3.fr/todo) * [RESTful doctesting using an application's request method](/restful_doctesting_using_request). - traduction demandée, voir [Todo](/docs/0.3.fr/todo) ## Entrées utilisateurs: + * [Uploader un fichier](/fileupload/fr). * [Stocker un fichier uploadé](/storeupload/fr). * [Comment limiter la taille des fichiers uploadés](/limiting_upload_size/fr). @@ -81,6 +88,7 @@ La version actuelle 0.3 est la branche développement. * [Rendu individuel des champs de formulaires](/form_fields). - traduction demandée, voir [Todo](/docs/0.3.fr/todo) ## Base de données: + * [Multiples bases de données](/multidbs). - traduction demandée, voir [Todo](/docs/0.3.fr/todo) * [Select: Récupérer les entrées d'une base de données](/select). - traduction demandée, voir [Todo](/docs/0.3.fr/todo) * [Update: Mettre à jour les entrées d'une base de données](/update). - traduction demandée, voir [Todo](/docs/0.3.fr/todo) @@ -93,6 +101,7 @@ La version actuelle 0.3 est la branche développement. * [Utiliser un dictionnaire comme clause where](/where_dict). - traduction demandée, voir [Todo](/docs/0.3.fr/todo) ## Déploiement: + * [Déploiement Fastcgi au travers lighttpd](/fastcgi-lighttpd/fr). * [Déploiement Fastcgi au travers Apache](/fastcgi-apache). - traduction demandée, voir [Todo](/docs/0.3.fr/todo) * [Déploiement CGI au travers Apache](/cgi-apache). - traduction demandée, voir [Todo](/docs/0.3.fr/todo) @@ -102,4 +111,5 @@ La version actuelle 0.3 est la branche développement. * [Déploiement Fastcgi au travers Nginx](/fastcgi-nginx). - traduction demandée, voir [Todo](/docs/0.3.fr/todo) ## Sous-domaines: + * Sous-domaines et comment accéder au nom utilisateur (requis) diff --git a/cookbook/input.md b/cookbook/input.md index 98f56a76..0dc3c8df 100644 --- a/cookbook/input.md +++ b/cookbook/input.md @@ -10,9 +10,11 @@ Other languages: [Français](/../cookbook/input.fr) | ... ## web.input ### Problem + You want user data from a form, or a url encoded parameter. ### Solution + The web.input() method returns a web.storage object (a dictionary-like object) that contains the variables from the url (in a GET) or in the http header (in a POST). For example, if you go to the page http://example.com/test?id=10, on the Python backend you'll want to extract that the id=10. Using web.input(), this becomes trivial: class SomePage: diff --git a/cookbook/input.zh-cn.md b/cookbook/input.zh-cn.md index 0efb77cf..56d8f97e 100644 --- a/cookbook/input.zh-cn.md +++ b/cookbook/input.zh-cn.md @@ -8,9 +8,11 @@ title: web.input ## web.input ### 问题 + 如何从form或是url参数接受用户数据. ### 解决方法 + web.input()方法返回一个包含从url(GET方法)或http header(POST方法,即表单POST)获取的变量的web.storage对象(类似字典).举个例子,如果你访问页面http://example.com/test?id=10,在Python后台你想取得 id=10 ,那么通过web.input()那就是小菜一碟: class SomePage: diff --git a/cookbook/layout_template.fr.md b/cookbook/layout_template.fr.md index 2cf937d7..3c5f0ca9 100644 --- a/cookbook/layout_template.fr.md +++ b/cookbook/layout_template.fr.md @@ -38,11 +38,13 @@ Si vous ne souhaitez pas utiliser le modèle de base, il suffit de créer un deu ### Astuce: Le titre de page est défini dans d'autres fichiers gabarits qui sont ensuite utilisés par la mise en page (layout.html). Par exemple: ##### templates/index.html + $var title: This is title.

Hello, world

##### templates/layout.html + $def with (content) diff --git a/cookbook/layout_template.md b/cookbook/layout_template.md index 5c5270f8..6ab68f6f 100644 --- a/cookbook/layout_template.md +++ b/cookbook/layout_template.md @@ -38,11 +38,13 @@ If you don't want to use the base template for something, just create a second r ### Tip: Page title is set in other template files which are then used by the layout (layout.html). Example: ##### templates/index.html + $var title: This is title.

Hello, world

##### templates/layout.html + $def with (content) @@ -54,6 +56,7 @@ If you don't want to use the base template for something, just create a second r ### Tip: Add css files in other template files. Example: + #### templates/login.html $var cssfiles: static/login.css static/login2.css diff --git a/cookbook/layout_template.zh-cn.md b/cookbook/layout_template.zh-cn.md index a5aedc9a..1090a0f3 100644 --- a/cookbook/layout_template.zh-cn.md +++ b/cookbook/layout_template.zh-cn.md @@ -36,11 +36,13 @@ title: 站点布局模板 ### Tip: 在布局文件(layout.html)中定义的页面标题变量,如何在其他模板文件中赋值,如下: ##### templates/index.html + $var title: This is title.

Hello, world

##### templates/layout.html + $def with (content) @@ -52,6 +54,7 @@ title: 站点布局模板 ### Tip: 在其他模板中引用css文件,如下: + #### templates/login.html $var cssfiles: static/login.css static/login2.css diff --git a/cookbook/mod_wsgi-apache-ubuntu.md b/cookbook/mod_wsgi-apache-ubuntu.md index e62210a1..3ba95dea 100644 --- a/cookbook/mod_wsgi-apache-ubuntu.md +++ b/cookbook/mod_wsgi-apache-ubuntu.md @@ -85,6 +85,7 @@ If you use sessions with `mod_wsgi`, you should change your code like below: application = app.wsgifunc() ### mod_wsgi performance: + For mod_wsgi performance, please refer to mod_wsgi wiki page: diff --git a/cookbook/mod_wsgi-apache.md b/cookbook/mod_wsgi-apache.md index d4447c68..b99d35c5 100644 --- a/cookbook/mod_wsgi-apache.md +++ b/cookbook/mod_wsgi-apache.md @@ -62,6 +62,7 @@ If you use sessions with mod_wsgi, you should change you code like below: application = app.wsgifunc() # mod_wsgi performance: + For mod_wsgi performance, please refer to mod_wsgi wiki page: \ No newline at end of file diff --git a/cookbook/multidbs.md b/cookbook/multidbs.md index 0a9cc7f1..e509053d 100644 --- a/cookbook/multidbs.md +++ b/cookbook/multidbs.md @@ -6,6 +6,7 @@ title: Multiple Databases # Multiple Databases ## Problem + You want to access multiple databases in a single project. ## Solution diff --git a/cookbook/multidbs.zh-cn.md b/cookbook/multidbs.zh-cn.md index 1ed454fe..5f316a2e 100644 --- a/cookbook/multidbs.zh-cn.md +++ b/cookbook/multidbs.zh-cn.md @@ -6,6 +6,7 @@ title: 多数据库使用 # 多数据库使用 ## 问题 + 如何在单独项目中应用多数据库? ## 解决办法 diff --git a/cookbook/redirect+seeother.md b/cookbook/redirect+seeother.md index 0e309554..ab3baa97 100644 --- a/cookbook/redirect+seeother.md +++ b/cookbook/redirect+seeother.md @@ -10,6 +10,7 @@ Other languages: [Français](/../cookbook/redirect+seeother.fr) | ... ## web.redirect and web.seeother ### Problem + After processing user input (from a form, let's say), you want to redirect them to another page. ### Solution @@ -24,4 +25,5 @@ When a post is sent to this function, on completion it will send the browser an Note: web.seeother and web.redirect are made exceptions in 0.3. ### Hangups + It's unlikely that you want to use the web.redirect function very often -- it appears to do the same thing, but it sends the http code 301, which is a permanent redirect. Most web browsers will cache the new redirection, and will send you to that location automatically when you try to perform the action again. A good use case for redirect is when you're changing the URL structure of your site, but want the old links to work due to bookmarking. diff --git a/cookbook/runtime-language-switch.md b/cookbook/runtime-language-switch.md index 80e634f5..d98771dd 100644 --- a/cookbook/runtime-language-switch.md +++ b/cookbook/runtime-language-switch.md @@ -6,6 +6,7 @@ title: Run-time language switch # Run-time language switch ## Problem: + How to implement run-time language switch? ## Solution: diff --git a/cookbook/runtime-language-switch.zh-cn.md b/cookbook/runtime-language-switch.zh-cn.md index e0936a1f..ef1ed795 100644 --- a/cookbook/runtime-language-switch.zh-cn.md +++ b/cookbook/runtime-language-switch.zh-cn.md @@ -6,6 +6,7 @@ title: 实时语言切换 # 实时语言切换 ## 问题: + 如何实现实时语言切换? ## 解法: diff --git a/cookbook/sessions_with_subapp.md b/cookbook/sessions_with_subapp.md index c1b0ef1c..278496da 100644 --- a/cookbook/sessions_with_subapp.md +++ b/cookbook/sessions_with_subapp.md @@ -8,9 +8,11 @@ title: Sessions with Sub-apps Other languages: [Français](/../cookbook/sessions_with_subapp.fr) | ... ### Note + *This solutions is taken from [this](http://www.mail-archive.com/webpy@googlegroups.com/msg02557.html) post on the web.py mailing list.* ## Problem + In its default behavior, session information can only be shared from within the main application, even if you 'import' the session from other modules. You need to be able to access session information from 'sub applications' but how? ## Solution diff --git a/cookbook/ssl.md b/cookbook/ssl.md index 0fc656e2..71cf8fdc 100644 --- a/cookbook/ssl.md +++ b/cookbook/ssl.md @@ -29,6 +29,7 @@ If you need to include `certificate_chain`, it can passed as additional keyword See [cheroot code](https://github.com/cherrypy/cheroot/blob/master/cheroot/ssl/builtin.py) for more details. ## Solution (Requires latest web.py version [0.37 installed from source as of this writing]) + import web from web.wsgiserver import CherryPyWSGIServer diff --git a/cookbook/template_cheetah.md b/cookbook/template_cheetah.md index 07c1fd23..ff3ac51c 100644 --- a/cookbook/template_cheetah.md +++ b/cookbook/template_cheetah.md @@ -6,6 +6,7 @@ title: Use Cheetah template engine in webpy # Use Cheetah template engine in webpy ### Problem + How to use Cheetah template engine in webpy? ### Solution diff --git a/cookbook/template_cheetah.zh-cn.md b/cookbook/template_cheetah.zh-cn.md index d5e91174..6e7747b3 100644 --- a/cookbook/template_cheetah.zh-cn.md +++ b/cookbook/template_cheetah.zh-cn.md @@ -1,11 +1,12 @@ ---- -layout: default -title: 在webpy中使用Cheetah模板引擎 ---- - -# 在webpy中使用Cheetah模板引擎 - +--- +layout: default +title: 在webpy中使用Cheetah模板引擎 +--- + +# 在webpy中使用Cheetah模板引擎 + ### 问题: + 怎样在webpy中使用Cheetah模板引擎? ### 解决: diff --git a/cookbook/template_jinja.md b/cookbook/template_jinja.md index f8a6c0ca..87570e36 100644 --- a/cookbook/template_jinja.md +++ b/cookbook/template_jinja.md @@ -6,6 +6,7 @@ title: Use Jinja2 template engine in webpy # Use Jinja2 template engine in webpy ### Problem + How to use Jinja2 (http://jinja.pocoo.org/2/) template engine in webpy? ### Solution 1 diff --git a/cookbook/template_mako.md b/cookbook/template_mako.md index 1c95df2c..272ddc2f 100644 --- a/cookbook/template_mako.md +++ b/cookbook/template_mako.md @@ -6,6 +6,7 @@ title: Use Mako template engine in webpy # Use Mako template engine in webpy ### Problem + How to use Mako template engine in webpy? ### Solution @@ -69,12 +70,15 @@ You can use relative paths in order to make it easier too. e.g. ) # Reference: + * http://code.google.com/p/modwsgi/wiki/ApplicationIssues # i18n support in Mako template file: + Please refer to cookbook 'i18n support in webpy template file' for i18n support in mako template file: * Cookbook: [i18n support in webpy template file](i18n_support_in_template_file ) # Note: + Babel is only needed to generate the .mo files. \ No newline at end of file diff --git a/cookbook/userauth.zh-cn.md b/cookbook/userauth.zh-cn.md index 65471aca..31a05a7b 100644 --- a/cookbook/userauth.zh-cn.md +++ b/cookbook/userauth.zh-cn.md @@ -15,7 +15,8 @@ title: 用户认证 用户认证系统由这几个部分组成:用户添加,用户登录,用户注销以及验证用户是否已登录。用户认证系统一般都需要一个数据库。在这个例子中,我们要用到MD5和SQLite。 -## +## + import hashlib import web diff --git a/cookbook/userauthbasic.md b/cookbook/userauthbasic.md index add2db06..5602a330 100644 --- a/cookbook/userauthbasic.md +++ b/cookbook/userauthbasic.md @@ -6,12 +6,14 @@ title: Basic authentication # Basic authentication ## Problem + This is a proof of concept implementation of doing basic authentication with web.py. You may want to read [RFC 2617](http://www.ietf.org/rfc/rfc2617.txt) or [http://en.wikipedia.org/wiki/Basic_access_authentication](http://en.wikipedia.org/wiki/Basic_access_authentication) for reference. ## Solution + Create a python file containing the code below and start the script. When you enter the url [http://localhost:8080/](http://localhost:8080/) you will be redirected to the url [http://localhost:8080/login](http://localhost:8080/login). @@ -64,4 +66,5 @@ index page. app.run() ## Notes + Do not use this code on real site - this is only for illustration. diff --git a/cookbook/userauthpgsql.md b/cookbook/userauthpgsql.md index e5af368b..a8454c00 100644 --- a/cookbook/userauthpgsql.md +++ b/cookbook/userauthpgsql.md @@ -147,6 +147,7 @@ For the reset function, we just kill the session, and redirect to the logout.htm return render.logout() ## 6th: HTML templates help + Well, I think that nobody will need this, but, I prefer to give all the informations. The most important is the login.html.
diff --git a/docs/0.2/tutorial2.es.md b/docs/0.2/tutorial2.es.md index 340294f1..a795e37e 100644 --- a/docs/0.2/tutorial2.es.md +++ b/docs/0.2/tutorial2.es.md @@ -6,6 +6,7 @@ title: tutorial2.es # tutorial2.es ## Tutorial de web.py 0.2 + Esta es la versión en español del tutorial en [Inglés](http://webpy.infogami.com/tutorial2.en) de web.py v 0.2, que se encuentra en este mismo sitio. El trabajo de traducción está en desarrollo. Todo aquel que desee colaborar sólo debe crear su cuenta. ## Iniciando. diff --git a/docs/0.2/tutorial2.fr.md b/docs/0.2/tutorial2.fr.md index bd1ec53f..e024ed4a 100644 --- a/docs/0.2/tutorial2.fr.md +++ b/docs/0.2/tutorial2.fr.md @@ -6,6 +6,7 @@ title: web.py 0.2 tutorial # web.py 0.2 tutorial ## Installation + Vous connaissez Python et vous voulez construire un site web. Web.py fournit le code pour faire cela d'une manière simple. Si vous voulez faire l’ensemble de ce tutoriel vous devrez installer Python, web.py, flup, psycopg2 et Postgres (ou une autre base de données avec son driver pour Python, par exemple : MySQL et mysqldb). Pour plus de détails voir le site de [webpy.org](http://webpy.org/). @@ -13,6 +14,7 @@ Si vous voulez faire l’ensemble de ce tutoriel vous devrez installer Python, w Si vous avez un projet web.py existant, regardez la page de [upgrade](http://webpy.infogami.com/upgrade_to_point2) pour plus d’informations sur la migration vers la nouvelle version. ## Gestion des URLs + La partie la plus importante pour chaque site web est la structure des URLs. Les URLs ne sont pas seulement ce que les visiteurs regarde et partage avec d’autres amis, mais ils sont aussi un modèle mental qui indique comment un Site Web fonctionne. (Dans les sites populaires comme [del.icio.us](http://del.icio.us/), les URLs font partie de l’interface de l’utilisateur). Pour cela Web.py facilite la création et la gestion des URL. Pour commencer l’application web.py , Créez un nouveau fichier et appelez le code.py par exemple et écrivez ceci dedans: diff --git a/docs/0.3.fr/index.md b/docs/0.3.fr/index.md index a9d1ed98..4366ebaf 100644 --- a/docs/0.3.fr/index.md +++ b/docs/0.3.fr/index.md @@ -8,6 +8,7 @@ title: Documentation de web.py 0.3 Autre langages: [English](/docs/0.3) | ... ## Installation + * [Installation](/install/fr). Installer web.py, configurer LightTPD, Apache, Nginx ...(CGI, FastCgi, ...) ## Tutorial @@ -20,6 +21,7 @@ Autre langages: [English](/docs/0.3) | ... * [Code samples](https://github.com/webpy/webpy-examples/). Example code of how to write some basic applications. (traduction demandée) ## Documentation des composants + * [Applications](/docs/0.3/apps/fr). Comment mapper des urls à du code python. * [Basic app](/docs/0.3/apps/basic/fr). Mapper des expressions régulières à des classes. * [Auto app](/docs/0.3/apps/auto/fr). Webpy suit les urls basées sur le nom des classes. diff --git a/docs/0.3/app_processors.fr.md b/docs/0.3/app_processors.fr.md index 94998744..0eceddac 100644 --- a/docs/0.3/app_processors.fr.md +++ b/docs/0.3/app_processors.fr.md @@ -31,6 +31,7 @@ Le "handle" de l'application processor se réfère au code qui sera envoyé à l Voici un exemple de base sur la façon dont un système d'authentification est créé en utilisant les applications processors. Ce n'est pas sécurisé pour une utilisation réelle; Cela ne vise qu'à démontrer comment les application processors pouvent vérifier quelque chose avant que chaque URL ne soit traitée. ## Exemple + """ Application processors dans web.py """ import web diff --git a/docs/0.3/app_processors.md b/docs/0.3/app_processors.md index 394fb06e..1cd65307 100644 --- a/docs/0.3/app_processors.md +++ b/docs/0.3/app_processors.md @@ -31,6 +31,7 @@ The "handle" of the app processor refers to the code that will be dispatched by Here's a basic example of how an authentication scheme is created using app processors. This is not secure for actual use; it is only meant to demonstrate how app processors can check something before each url is processed. ## Example + """ Application processors in web.py """ import web diff --git a/docs/0.3/index.md b/docs/0.3/index.md index 3e41ace7..ca37bff7 100644 --- a/docs/0.3/index.md +++ b/docs/0.3/index.md @@ -8,6 +8,7 @@ title: web.py 0.3 documentation Other languages: [Français](/docs/0.3.fr) | ... ## Install + * [Install](/install). Install web.py, configure LightTPD, Apache, Nginx ...(CGI, FastCgi, ...) ## Tutorial @@ -20,6 +21,7 @@ Other languages: [Français](/docs/0.3.fr) | ... * [Code samples](https://github.com/webpy/webpy-examples/). Example code of how to write some basic applications. ## Component Documentation + * [Applications](/docs/0.3/apps). How to map urls to python code paths. * [Basic app](/docs/0.3/apps/basic). Map regexes to classes. * [Auto app](/docs/0.3/apps/auto). Have webpy keep track of the urls based on class name. diff --git a/docs/0.3/sessions.fr.md b/docs/0.3/sessions.fr.md index 23cfb3bd..fbe5398b 100644 --- a/docs/0.3/sessions.fr.md +++ b/docs/0.3/sessions.fr.md @@ -28,6 +28,7 @@ Les sessions de web.py permettent différents procédés de stockage des donnée Les méthodes de stockage ont des performances variées et des ajustement d'installation, donc les options vous permettent de choisir ce qui convient le mieux pour votre appplication. ## Exemple + Le code suivant montre comment utiliser une session de base DiskStore. import web diff --git a/docs/0.3/sessions.md b/docs/0.3/sessions.md index 0532a6e3..fb1f3453 100644 --- a/docs/0.3/sessions.md +++ b/docs/0.3/sessions.md @@ -12,6 +12,7 @@ Sessions are a way to store information between requests, thereby making http st Sessions are convenient because they allow a programmer to store user state in native Python objects. ## Storage types + web.py sessions allow for multiple ways to store the session data. These methods include: * DiskStore. Session data is pickled in a designated directory. When instantiating, the first and only argument is the folder where the session information should be stored on disk. @@ -26,6 +27,7 @@ web.py sessions allow for multiple ways to store the session data. These method The storage methods have various performance and setup tradeoffs, so the options allow you to choose what's best for your application. ## Example + The following code shows how to use a basic DiskStore session. import web @@ -62,6 +64,7 @@ The following code shows how to use a basic DiskStore session. app.run() ## Sessions and Reloading/Debug Mode + Is your session data disappearing for seemingly no reason? This can happen when using the web.py app reloader (local debug mode), which will not persist the session object between reloads. Here's a nifty hack to get around this. # Hack to make session play nice with the reloader (in debug mode) diff --git a/docs/work.md b/docs/work.md index 9c094556..5510d237 100644 --- a/docs/work.md +++ b/docs/work.md @@ -13,6 +13,7 @@ When adding work to be done, please place it in a section devoted to the page an *** # Cookbook: [Cookbook](/cookbook) + * database select example code is incorrect *** @@ -26,9 +27,11 @@ When finishing working on something, delete it from the list. If a code block re *** # Code samples: [Code samples](https://github.com/webpy/webpy-examples/) + * Move url to /samples ## Samples + * simple-wiki: 0.2, external * simple-wiki num 2: 0.2, external * simple delicious: 0.2 diff --git a/install.it.md b/install.it.md index d179a46f..d8911148 100644 --- a/install.it.md +++ b/install.it.md @@ -143,6 +143,7 @@ e indirizza il tuo browser a `http://example.com/code.py/`. Non dimenticare lo s [Walter ha altri consigli](http://lemurware.blogspot.com/2006/05/webpy-apache-configuration-and-you.html)[e](http://www.dofollownet.com/). #### ...con SCGI + https://www.mems-exchange.org/software/scgi/ scarica i sorgenti di `mod_scgi` da qui: http://www.mems-exchange.org/software/files/mod_scgi/ Per gli utenti apache su Windows: diff --git a/install.ja.md b/install.ja.md index 30612859..d193c58a 100644 --- a/install.ja.md +++ b/install.ja.md @@ -148,6 +148,7 @@ and point your browser to `http://example.com/code.py/`. Don't forget the traili [Walterからの追加のアドバイスはこちら](http://lemurware.blogspot.com/2006/05/webpy-apache-configuration-and-you.html). #### ...with SCGI + https://www.mems-exchange.org/software/scgi/ download `mod_scgi` source here: http://www.mems-exchange.org/software/files/mod_scgi/ windows apache user: diff --git a/templetor.md b/templetor.md index 81cb1347..e9cf5e72 100644 --- a/templetor.md +++ b/templetor.md @@ -185,6 +185,7 @@ Here's an example: The first line imports templetor. The second says that our templates are in the directory `templates/`. The third give all our templates access to the `len` function. The fourth grabs the template `message.html`, passes it the argument `'Hello, world!'`, passes the result of rendering it to [mcitp](http://www.buyitcert.com/mcitp.html) the template `base.html` and prints the result. (If your templates don't end in `.html` or `.xml`, templetor will still find them, but it won't do its automatic HTML-encoding.) ## Turning Off Filter + By default `template.render` will use `web.websafe` filter to do HTML-encoding. To turn it off, put a : after the $ as in: $:form.render() @@ -196,6 +197,7 @@ Output from form.render() will be displayed as is. Output from variable in template will be displayed as is. ## Including / nesting templates + If you want to nest one template within another, you nest the `render()` calls, and then include the variable (unfiltered) in the page. In your handler: From 5b1a1b2187d50e70ff158b31783e6282c894c410 Mon Sep 17 00:00:00 2001 From: nattheriddle1 <69092489+nattheriddle1@users.noreply.github.com> Date: Wed, 3 Aug 2022 10:33:18 -0500 Subject: [PATCH 11/13] Made spacing after bullets consistent Markdown list delimiters need only be followed by one space. --- cookbook/ctx.fr.md | 30 +++++++++++++++--------------- cookbook/ctx.md | 28 ++++++++++++++-------------- cookbook/ctx.zh-cn.md | 28 ++++++++++++++-------------- recommended_setup.fr.md | 16 ++++++++-------- recommended_setup.ja.md | 16 ++++++++-------- recommended_setup.md | 10 +++++----- 6 files changed, 64 insertions(+), 64 deletions(-) diff --git a/cookbook/ctx.fr.md b/cookbook/ctx.fr.md index 64351b16..cd44db7f 100644 --- a/cookbook/ctx.fr.md +++ b/cookbook/ctx.fr.md @@ -36,21 +36,21 @@ Données que l'on trouve dans 'ctx' ### Request ### -* `environ` alias 'env' – un dictionnaire contenant les variables environnement standard de [WSGI](http://www.python.org/dev/peps/pep-0333/#environ-variables) -* `home` – le chemin de base pour l'application, y compris tout élément «consommée» par les applications extérieures *http://example.org/admin* -* `homedomain` – ? (semble être le protocole + l'hôte) *http://example.org* -* `homepath` – La partie du chemin requise par l'utilisateur, déduite de l'application courante. C'est à dire homepath + path = le chemin actuellement requis en HTTP par l'utilisateur. Exemple: */admin* - -* `host` – le nom d'hôte (domaine) et (si ce n'est pas celui par défaut) le port requis par l'utilisateur. Exemple: *example.org*, *example.org:8080* -* `ip` – L'adresse ip de l'utilisateur. exemple: *xxx.xxx.xxx.xxx* -* `method` – la méthode HTTP utilisée. exemple: *GET* -* `path` – Le chemin demandé par l'utilisateur, relatif à l'aaplication en cours. Si vous utilisez des sous-applications, chaque partie de l'url filtrée par l'application externe sera déduite. Par exemple: vous avez une application principale dans code.py, et une sous application appelée 'admin.py'. Dans 'code.py', vous pointez '/admin' vers 'admin.app'. Dans 'admin.py', vous pointez '/stories' sur une classe nommée 'stories'. Au sein de 'stories', 'web.ctx.path' sera '/stories' et pas '/admin/stories'. Exemple: */articles/845* -* `protocol` – Le protocole utilisé. Exemple: *https* -* `query` – Une chaîne vide s'il n'y a pas d'argument de requête autre que '?' suivit par la chaine de requête. Exemple *?fourlegs=good&twolegs=bad* -* `fullpath` alias 'path + query' – Le chemin demandé inclut les arguments de requête mais n'inclut *pas* 'homepath'. Exemple : */articles/845?fourlegs=good&twolegs=bad* +* `environ` alias 'env' – un dictionnaire contenant les variables environnement standard de [WSGI](http://www.python.org/dev/peps/pep-0333/#environ-variables) +* `home` – le chemin de base pour l'application, y compris tout élément «consommée» par les applications extérieures *http://example.org/admin* +* `homedomain` – ? (semble être le protocole + l'hôte) *http://example.org* +* `homepath` – La partie du chemin requise par l'utilisateur, déduite de l'application courante. C'est à dire homepath + path = le chemin actuellement requis en HTTP par l'utilisateur. Exemple: */admin* + +* `host` – le nom d'hôte (domaine) et (si ce n'est pas celui par défaut) le port requis par l'utilisateur. Exemple: *example.org*, *example.org:8080* +* `ip` – L'adresse ip de l'utilisateur. exemple: *xxx.xxx.xxx.xxx* +* `method` – la méthode HTTP utilisée. exemple: *GET* +* `path` – Le chemin demandé par l'utilisateur, relatif à l'aaplication en cours. Si vous utilisez des sous-applications, chaque partie de l'url filtrée par l'application externe sera déduite. Par exemple: vous avez une application principale dans code.py, et une sous application appelée 'admin.py'. Dans 'code.py', vous pointez '/admin' vers 'admin.app'. Dans 'admin.py', vous pointez '/stories' sur une classe nommée 'stories'. Au sein de 'stories', 'web.ctx.path' sera '/stories' et pas '/admin/stories'. Exemple: */articles/845* +* `protocol` – Le protocole utilisé. Exemple: *https* +* `query` – Une chaîne vide s'il n'y a pas d'argument de requête autre que '?' suivit par la chaine de requête. Exemple *?fourlegs=good&twolegs=bad* +* `fullpath` alias 'path + query' – Le chemin demandé inclut les arguments de requête mais n'inclut *pas* 'homepath'. Exemple : */articles/845?fourlegs=good&twolegs=bad* ### Response ### -* `status` – Le code statut HTTP (par defaut '200 OK') *401 Unauthorized* -* `headers` – Une liste de deux tuples contenant les en-têtes HTTP (headers) -* `output` – Une chaîne contenant l'entité de réponse +* `status` – Le code statut HTTP (par defaut '200 OK') *401 Unauthorized* +* `headers` – Une liste de deux tuples contenant les en-têtes HTTP (headers) +* `output` – Une chaîne contenant l'entité de réponse diff --git a/cookbook/ctx.md b/cookbook/ctx.md index 1b02bfe4..01e185ad 100644 --- a/cookbook/ctx.md +++ b/cookbook/ctx.md @@ -36,20 +36,20 @@ Data Found in `ctx` ### Request ### -* `environ` a.k.a. `env` – a dictionary containing the standard [WSGI environment variables](http://www.python.org/dev/peps/pep-0333/#environ-variables) -* `home` – the base path for the application, including any parts "consumed" by outer applications *http://example.org/admin* -* `homedomain` – ? (appears to be protocol + host) *http://example.org* -* `homepath` – The part of the path requested by the user which was trimmed off the current app. That is homepath + path = the path actually requested in HTTP by the user. E.g. */admin* This seems to be derived during startup from the environment variable REAL_SCRIPT_NAME. It affects what web.url() will prepend to supplied urls. This in turn affects where web.seeother() will go, which might interact badly with your url rewriting scheme (e.g. mod_rewrite) -* `host` – the hostname (domain) and (if not default) the port requested by the user. E.g. *example.org*, *example.org:8080* -* `ip` – the IP address of the user. E.g. *xxx.xxx.xxx.xxx* -* `method` – the HTTP method used. E.g. *GET* -* `path` – the path requested by the user, relative to the current application. If you are using subapplications, any part of the url matched by the outer application will be trimmed off. E.g. you have a main app in `code.py`, and a subapplication called `admin.py`. In `code.py`, you point `/admin` to `admin.app`. In `admin.py`, you point `/stories` to a class called `stories`. Within `stories`, `web.ctx.path` will be `/stories`, not `/admin/stories`. E.g. */articles/845* -* `protocol` – the protocol used. E.g. *https* -* `query` – an empty string if there are no query arguments otherwise a `?` followed by the query string. E.g. *?fourlegs=good&twolegs=bad* -* `fullpath` a.k.a. `path + query` – the path requested *including* query arguments but *not* including `homepath`. E.g. */articles/845?fourlegs=good&twolegs=bad* +* `environ` a.k.a. `env` – a dictionary containing the standard [WSGI environment variables](http://www.python.org/dev/peps/pep-0333/#environ-variables) +* `home` – the base path for the application, including any parts "consumed" by outer applications *http://example.org/admin* +* `homedomain` – ? (appears to be protocol + host) *http://example.org* +* `homepath` – The part of the path requested by the user which was trimmed off the current app. That is homepath + path = the path actually requested in HTTP by the user. E.g. */admin* This seems to be derived during startup from the environment variable REAL_SCRIPT_NAME. It affects what web.url() will prepend to supplied urls. This in turn affects where web.seeother() will go, which might interact badly with your url rewriting scheme (e.g. mod_rewrite) +* `host` – the hostname (domain) and (if not default) the port requested by the user. E.g. *example.org*, *example.org:8080* +* `ip` – the IP address of the user. E.g. *xxx.xxx.xxx.xxx* +* `method` – the HTTP method used. E.g. *GET* +* `path` – the path requested by the user, relative to the current application. If you are using subapplications, any part of the url matched by the outer application will be trimmed off. E.g. you have a main app in `code.py`, and a subapplication called `admin.py`. In `code.py`, you point `/admin` to `admin.app`. In `admin.py`, you point `/stories` to a class called `stories`. Within `stories`, `web.ctx.path` will be `/stories`, not `/admin/stories`. E.g. */articles/845* +* `protocol` – the protocol used. E.g. *https* +* `query` – an empty string if there are no query arguments otherwise a `?` followed by the query string. E.g. *?fourlegs=good&twolegs=bad* +* `fullpath` a.k.a. `path + query` – the path requested *including* query arguments but *not* including `homepath`. E.g. */articles/845?fourlegs=good&twolegs=bad* ### Response ### -* `status` – the HTTP status code (default '200 OK') *401 Unauthorized* -* `headers` – a list of 2-tuples containing HTTP headers -* `output` – a string containing the response entity +* `status` – the HTTP status code (default '200 OK') *401 Unauthorized* +* `headers` – a list of 2-tuples containing HTTP headers +* `output` – a string containing the response entity diff --git a/cookbook/ctx.zh-cn.md b/cookbook/ctx.zh-cn.md index 7a699cc3..90376efa 100644 --- a/cookbook/ctx.zh-cn.md +++ b/cookbook/ctx.zh-cn.md @@ -33,19 +33,19 @@ web.ctx另一个特性,是它可以被loadhook赋值。例如:当一个请 ------------------- ### Request ### -* `environ` 又被写做. `env` – 包含标准WSGI环境变量的字典。 -* `home` – 应用的http根路径(译注:可以理解为应用的起始网址,协议+站点域名+应用所在路径)例:*http://example.org/admin* -* `homedomain` – 应用所在站点(可以理解为协议+域名) *http://example.org* -* `homepath` – 当前应用所在的路径,例如: */admin* -* `host` – 主机名(域名)+用户请求的端口(如果没有的话,就是默认的80端口),例如: *example.org*, *example.org:8080* -* `ip` – 用户的IP地址,例如: *xxx.xxx.xxx.xxx* -* `method` – 所用的HTTP方法,例如: *GET* -* `path` – 用户请求路径,它是基于当前应用的相对路径。在子应用中,匹配外部应用的那部分网址将被去掉。例如:主应用在`code.py`中,而子应用在`admin.py`中。在`code.py`中, 我们将`/admin`关联到`admin.app`。 在`admin.py`中, 将`/stories`关联到`stories`类。在 `stories`中, `web.ctx.path`就是`/stories`, 而非`/admin/stories`。形如: */articles/845* -* `protocol` – 所用协议,例如: *https* -* `query` – 跟在'?'字符后面的查询字符串。如果不存在查询参数,它就是一个空字符串。例如: *?fourlegs=good&twolegs=bad* -* `fullpath` 可以视为 `path + query` – 包含查询参数的请求路径,但不包括'homepath'。例如:*/articles/845?fourlegs=good&twolegs=bad* +* `environ` 又被写做. `env` – 包含标准WSGI环境变量的字典。 +* `home` – 应用的http根路径(译注:可以理解为应用的起始网址,协议+站点域名+应用所在路径)例:*http://example.org/admin* +* `homedomain` – 应用所在站点(可以理解为协议+域名) *http://example.org* +* `homepath` – 当前应用所在的路径,例如: */admin* +* `host` – 主机名(域名)+用户请求的端口(如果没有的话,就是默认的80端口),例如: *example.org*, *example.org:8080* +* `ip` – 用户的IP地址,例如: *xxx.xxx.xxx.xxx* +* `method` – 所用的HTTP方法,例如: *GET* +* `path` – 用户请求路径,它是基于当前应用的相对路径。在子应用中,匹配外部应用的那部分网址将被去掉。例如:主应用在`code.py`中,而子应用在`admin.py`中。在`code.py`中, 我们将`/admin`关联到`admin.app`。 在`admin.py`中, 将`/stories`关联到`stories`类。在 `stories`中, `web.ctx.path`就是`/stories`, 而非`/admin/stories`。形如: */articles/845* +* `protocol` – 所用协议,例如: *https* +* `query` – 跟在'?'字符后面的查询字符串。如果不存在查询参数,它就是一个空字符串。例如: *?fourlegs=good&twolegs=bad* +* `fullpath` 可以视为 `path + query` – 包含查询参数的请求路径,但不包括'homepath'。例如:*/articles/845?fourlegs=good&twolegs=bad* ### Response ### -* `status` – HTTP状态码(默认是'200 OK') *401 Unauthorized 未经授权* -* `headers` – 包含HTTP头信息(headers)的二元组列表。 -* `output` – 包含响应实体的字符串。 \ No newline at end of file +* `status` – HTTP状态码(默认是'200 OK') *401 Unauthorized 未经授权* +* `headers` – 包含HTTP头信息(headers)的二元组列表。 +* `output` – 包含响应实体的字符串。 \ No newline at end of file diff --git a/recommended_setup.fr.md b/recommended_setup.fr.md index 76538f61..5cc927da 100644 --- a/recommended_setup.fr.md +++ b/recommended_setup.fr.md @@ -21,31 +21,31 @@ Web.py recommande les logiciels suivants pour les serveurs de production: Webpy dispose d'un serveur web interne, mais il devrait être utilisé pour le développement seulement. Pour le déploiement, un serveur plus robuste est recommandé, comme l'un de ceux-ci: -* [lighttpd](http://www.lighttpd.net/download/) [BSD] [(doc)](http://trac.lighttpd.net/trac/wiki/#ReferenceDocumentation) via [flup's fastcgi](http://trac.saddi.com/flup) [BSD] ('easy_install flup') -* [Apache](http://www.apache.org/) [Apache] via [(mod_wsgi)](http://code.google.com/p/modwsgi/) [Apache] +* [lighttpd](http://www.lighttpd.net/download/) [BSD] [(doc)](http://trac.lighttpd.net/trac/wiki/#ReferenceDocumentation) via [flup's fastcgi](http://trac.saddi.com/flup) [BSD] ('easy_install flup') +* [Apache](http://www.apache.org/) [Apache] via [(mod_wsgi)](http://code.google.com/p/modwsgi/) [Apache]

Bases de données:

Webpy ne nécessite pas de base de données pour fonctionner. Il supporte néanmoins les bases suivantes: -* [postgresql](http://www.postgresql.org/download/) [BSD] [(doc)](http://www.postgresql.org/docs/) avec [psycopg2](http://initd.org/pub/software/psycopg/) [BSD] [(doc)](http://www.initd.org/tracker/psycopg/wiki/PsycopgTwo) comme client python. ('easy_install psycopg2') -* [mysql](http://dev.mysql.com/downloads/mysql/5.0.html) [GPL] [(doc)](http://www.mysql.org/doc/) avec [MySQLdb](http://sourceforge.net/project/showfiles.php?group_id=22307) [CNRI] [(doc)](http://mysql-python.sourceforge.net/MySQLdb.html) comme client python ('easy_install MySQL-python') -* [sqlite](http://www.sqlite.org/) [Public domain] [(doc)](http://www.sqlite.org/docs.html) avec [pysqlite](http://code.google.com/p/pysqlite/) comme client python ('easy_install pysqlite'). +* [postgresql](http://www.postgresql.org/download/) [BSD] [(doc)](http://www.postgresql.org/docs/) avec [psycopg2](http://initd.org/pub/software/psycopg/) [BSD] [(doc)](http://www.initd.org/tracker/psycopg/wiki/PsycopgTwo) comme client python. ('easy_install psycopg2') +* [mysql](http://dev.mysql.com/downloads/mysql/5.0.html) [GPL] [(doc)](http://www.mysql.org/doc/) avec [MySQLdb](http://sourceforge.net/project/showfiles.php?group_id=22307) [CNRI] [(doc)](http://mysql-python.sourceforge.net/MySQLdb.html) comme client python ('easy_install MySQL-python') +* [sqlite](http://www.sqlite.org/) [Public domain] [(doc)](http://www.sqlite.org/docs.html) avec [pysqlite](http://code.google.com/p/pysqlite/) comme client python ('easy_install pysqlite').

Pool de connexions:

Pour les sites à haut traffic, le pool de connexion autorise Webpy à conserver de multiples connexions aux bases de données ouvertes, afin d'accélérer l'accès aux bases. Cette option est facultative, mais disponible comme échelon tactique. -* [DBUtils](http://www.w4py.org/downloads/DBUtils/) [CNRI] [(doc)](http://www.webwareforpython.org/DBUtils/Docs/UsersGuide.html) ('easy_install DBUtils') +* [DBUtils](http://www.w4py.org/downloads/DBUtils/) [CNRI] [(doc)](http://www.webwareforpython.org/DBUtils/Docs/UsersGuide.html) ('easy_install DBUtils')

Modèles, gabarits:

Webpy possède son propre système de gabarit qui permet aux utilisateurs d'autoriser l'écriture de gabarits aux utilisateurs moins épprouvés, et d'utiliser une syntaxe proche de celle du python dans les templates. -* template.py [built-in] [(doc)](/docs/0.3/templetor.fr) +* template.py [built-in] [(doc)](/docs/0.3/templetor.fr)

Entrées utilisateurs:

Markdown permet aux utilisateurs de Webpy d'écrire du texte qui est convertit en HTML dans la page. Ce n'est pas indispensable, mais c'est la meilleure façon de générer du HTML à partir des entrées utilisateur. -* [python-markdown](http://sourceforge.net/project/showfiles.php?group_id=153041) [BSD] [(doc)](http://www.freewisdom.org/projects/python-markdown/) \ No newline at end of file +* [python-markdown](http://sourceforge.net/project/showfiles.php?group_id=153041) [BSD] [(doc)](http://www.freewisdom.org/projects/python-markdown/) \ No newline at end of file diff --git a/recommended_setup.ja.md b/recommended_setup.ja.md index 1e032f0f..eb096a19 100644 --- a/recommended_setup.ja.md +++ b/recommended_setup.ja.md @@ -8,21 +8,21 @@ title: 推奨環境 web.pyは以下のソフトウェアを推奨しています。: ##ウェブサーバー: -* [lighttpd](http://www.lighttpd.net/download/) [BSD] [(doc)](http://trac.lighttpd.net/trac/wiki/#ReferenceDocumentation) +* [lighttpd](http://www.lighttpd.net/download/) [BSD] [(doc)](http://trac.lighttpd.net/trac/wiki/#ReferenceDocumentation) ##データベース: -* [postgresql](http://www.postgresql.org/download/) [BSD] [(doc)](http://www.postgresql.org/docs/) with [psycopg2](http://initd.org/pub/software/psycopg/) [BSD] [(doc)](http://www.initd.org/tracker/psycopg/wiki/PsycopgTwo) as the python client. (`easy_install psycopg2`) +* [postgresql](http://www.postgresql.org/download/) [BSD] [(doc)](http://www.postgresql.org/docs/) with [psycopg2](http://initd.org/pub/software/psycopg/) [BSD] [(doc)](http://www.initd.org/tracker/psycopg/wiki/PsycopgTwo) as the python client. (`easy_install psycopg2`) -* [mysql](http://dev.mysql.com/downloads/mysql/5.0.html) [GPL] [(doc)](http://www.mysql.org/doc/) with [MySQLdb](http://sourceforge.net/project/showfiles.php?group_id=22307) [CNRI] [(doc)](http://sourceforge.net/docman/?group_id=22307) as the python client (`easy_install MySQL-python`) +* [mysql](http://dev.mysql.com/downloads/mysql/5.0.html) [GPL] [(doc)](http://www.mysql.org/doc/) with [MySQLdb](http://sourceforge.net/project/showfiles.php?group_id=22307) [CNRI] [(doc)](http://sourceforge.net/docman/?group_id=22307) as the python client (`easy_install MySQL-python`) ##CGI/FastCGI/SCGI: -* [flup](http://trac.saddi.com/flup) [BSD] (`easy_install flup`) +* [flup](http://trac.saddi.com/flup) [BSD] (`easy_install flup`) ##コネクションプール: -* [DBUtils](http://www.w4py.org/downloads/DBUtils/) [CNRI] [(doc)](http://www.webwareforpython.org/DBUtils/Docs/UsersGuide.html) (`easy_install DBUtils`) +* [DBUtils](http://www.w4py.org/downloads/DBUtils/) [CNRI] [(doc)](http://www.webwareforpython.org/DBUtils/Docs/UsersGuide.html) (`easy_install DBUtils`) ##テンプレートエンジン: -* template.py [built-in] [(doc)](templetor) -* [Cheetah](http://dl.sourceforge.net/cheetahtemplate/Cheetah-1.0.tar.gz) 1.0 [BSD] [(doc)](http://www.cheetahtemplate.org/learn.html) +* template.py [built-in] [(doc)](templetor) +* [Cheetah](http://dl.sourceforge.net/cheetahtemplate/Cheetah-1.0.tar.gz) 1.0 [BSD] [(doc)](http://www.cheetahtemplate.org/learn.html) ##User Input: -* [python-markdown](http://sourceforge.net/project/showfiles.php?group_id=153041) [BSD] [(doc)](http://www.freewisdom.org/projects/python-markdown/) \ No newline at end of file +* [python-markdown](http://sourceforge.net/project/showfiles.php?group_id=153041) [BSD] [(doc)](http://www.freewisdom.org/projects/python-markdown/) \ No newline at end of file diff --git a/recommended_setup.md b/recommended_setup.md index f9e7f8b8..af2f6baa 100644 --- a/recommended_setup.md +++ b/recommended_setup.md @@ -27,20 +27,20 @@ Webpy has an internal web server, but it should be used for development only. Fo Webpy does not require a database to run. It does, however, support using the following databases: -* [postgresql](http://www.postgresql.org/download/) [BSD] [(doc)](http://www.postgresql.org/docs/) with [psycopg2](http://initd.org/pub/software/psycopg/) [BSD] [(doc)](http://www.initd.org/tracker/psycopg/wiki/PsycopgTwo) as the python client. (`easy_install psycopg2`) -* [mysql](http://dev.mysql.com/downloads/mysql/5.0.html) [GPL] [(doc)](http://www.mysql.org/doc/) with [MySQLdb](http://sourceforge.net/project/showfiles.php?group_id=22307) [CNRI] [(doc)](http://mysql-python.sourceforge.net/MySQLdb.html) as the python client (`easy_install MySQL-python`) -* [sqlite](http://www.sqlite.org/) [Public domain] [(doc)](http://www.sqlite.org/docs.html) with [pysqlite](http://code.google.com/p/pysqlite/) as python client (`easy_install pysqlite`). +* [postgresql](http://www.postgresql.org/download/) [BSD] [(doc)](http://www.postgresql.org/docs/) with [psycopg2](http://initd.org/pub/software/psycopg/) [BSD] [(doc)](http://www.initd.org/tracker/psycopg/wiki/PsycopgTwo) as the python client. (`easy_install psycopg2`) +* [mysql](http://dev.mysql.com/downloads/mysql/5.0.html) [GPL] [(doc)](http://www.mysql.org/doc/) with [MySQLdb](http://sourceforge.net/project/showfiles.php?group_id=22307) [CNRI] [(doc)](http://mysql-python.sourceforge.net/MySQLdb.html) as the python client (`easy_install MySQL-python`) +* [sqlite](http://www.sqlite.org/) [Public domain] [(doc)](http://www.sqlite.org/docs.html) with [pysqlite](http://code.google.com/p/pysqlite/) as python client (`easy_install pysqlite`). ## Connection Pooling For high traffic sites, connection pooling allows Webpy to keep multiple database connections open, typically allowing faster access from the database. This is optional, but available as a scaling tactic. -* [DBUtils](http://www.w4py.org/downloads/DBUtils/) [CNRI] [(doc)](http://www.webwareforpython.org/DBUtils/Docs/UsersGuide.html) (`easy_install DBUtils`) +* [DBUtils](http://www.w4py.org/downloads/DBUtils/) [CNRI] [(doc)](http://www.webwareforpython.org/DBUtils/Docs/UsersGuide.html) (`easy_install DBUtils`) ## Templates Webpy has its own template system which allows users to let untrusted users write templates using this, and use python-like syntax within templates. -* template.py [built-in] [(doc)](/docs/0.3/templetor) +* template.py [built-in] [(doc)](/docs/0.3/templetor) [Jinja2](https://jinja.palletsprojects.com/) is more popolar and feature rich, we strongly recommend Jinja2. From 9e07221d4dcc64ca4a440bfe4a14f17e147656ce Mon Sep 17 00:00:00 2001 From: nattheriddle1 <69092489+nattheriddle1@users.noreply.github.com> Date: Wed, 3 Aug 2022 11:00:33 -0500 Subject: [PATCH 12/13] Made triple delimiters consistent Replaced repeated hyphens and asterisks with triple hyphens. Replaced triple hyphens after a heading with more traditional Markdown headings. Replaced triple tildes for code blocks with triple backticks. --- cookbook/ctx.fr.md | 12 ++++-------- cookbook/ctx.md | 12 ++++-------- cookbook/ctx.zh-cn.md | 12 ++++-------- cookbook/index.fr.md | 2 +- cookbook/index.ja.md | 2 +- cookbook/index.zh-cn.md | 2 +- cookbook/staticfiles.fr.md | 6 ++---- cookbook/template_jinja.md | 4 ++-- cookbook/template_jinja.zh-cn.md | 4 ++-- cookbook/where_dict.md | 9 +++------ cookbook/where_dict.zh-cn.md | 23 ++++++++++------------- docs/0.2/tutorial2.ru.md | 6 ++---- docs/0.3.fr/todo.md | 2 +- docs/0.3/todo.fr.md | 2 +- docs/work.md | 10 ++++++---- 15 files changed, 44 insertions(+), 64 deletions(-) diff --git a/cookbook/ctx.fr.md b/cookbook/ctx.fr.md index cd44db7f..3f8a016a 100644 --- a/cookbook/ctx.fr.md +++ b/cookbook/ctx.fr.md @@ -7,20 +7,17 @@ title: web.ctx Autre langages: [English](/../ctx) | ... -Probleme -------- +## Probleme Vous souhaitez utiliser des variables contextuelles dans votre code comme la page référante ou le navigateur du client. -Solution --------- +## Solution C'est possible en utilisant 'web.ctx'. D'abord un peu d'architecture: 'web.ctx' est basée sur la classe 'threadeddict', alias 'ThreadedDict'. Cette classe crée un objet de type dictionnaire qui possède des attributs spécifiques au processus id de thread. C'est élégant dans la mesure ou cela nous permet d'utiliser un objet de type dictionnaire, tandis que beaucoup d'utilisateurs accèdent au système simultanément, et l'objet ne contiendra que les données de la requête HTTP donnée. (aucune données n'est partagée donc l'objet est ["thread-safe"](http://fr.wikipedia.org/wiki/Threadsafe) -- _On dit qu’un programme ou qu'une portion de code est thread-safe s’il fonctionne correctement durant une exécution simultanée par plusieurs threads (processus légers)_.) 'web.ctx' contient des variables pour chaque requête qui comprennent des informations spécifiques pour chaque demande, comme les variables environnement du client. En supposant que vous vouliez déterminer quelle était la page référante d'un utilisateur accédant à une page: -Exemple -------- +## Exemple class example: def GET(self): @@ -31,8 +28,7 @@ Ce code utilise 'web.ctx.env' pour accéder à l'environnement variables 'HTTP_R 'web.ctx' est aussi très pratique car il peut-être rêglé par un ['loadhook'] (../application_processors/fr). Les données session, par exemple, sont fixées chaque fois qu'une demande est traitée et les données sont stockées dans 'web.ctx'. Depuis que 'web.ctx' est ["thread-safe"](http://fr.wikipedia.org/wiki/Threadsafe), vous pouvez utiliser les données session comme si elles étaient un objet régulier python. -Données que l'on trouve dans 'ctx' -------------------- +## Données que l'on trouve dans 'ctx' ### Request ### diff --git a/cookbook/ctx.md b/cookbook/ctx.md index 01e185ad..b7b473c0 100644 --- a/cookbook/ctx.md +++ b/cookbook/ctx.md @@ -7,20 +7,17 @@ title: ctx Other languages: [Français](/../cookbook/ctx.fr) | ... -Problem -------- +## Problem You want to use contextual variables in your code such as the referring page or the client's browser. -Solution --------- +## Solution Using `web.ctx` makes this possible. First a little architecture: `web.ctx` is based on the class `threadeddict` a.k.a. `ThreadedDict`. This class creates a dictionary-like object that has attributes specific to the thread process id. This is nice because it lets us use a dictionary-like object when many users are accessing the system simultaneously, and the object will only have the data for the given HTTP request (no data is shared so the object is thread-safe). `web.ctx` holds variables for each request that contain specific information to each request such as the client environment variable. Assuming you want to determine what the referring page was for a user accessing a page: -Example -------- +## Example class example: def GET(self): @@ -31,8 +28,7 @@ This code uses `web.ctx.env` to access the `HTTP_REFERER` environment variable. `web.ctx` is also useful because it can be set by a `loadhook`. Session data, for example, is set each time a request is handled and the data is stored in `web.ctx`. Since `web.ctx` is thread-safe, you can use the session data as if it were a regular python object. -Data Found in `ctx` -------------------- +## Data Found in `ctx` ### Request ### diff --git a/cookbook/ctx.zh-cn.md b/cookbook/ctx.zh-cn.md index 90376efa..c5bf437a 100644 --- a/cookbook/ctx.zh-cn.md +++ b/cookbook/ctx.zh-cn.md @@ -5,20 +5,17 @@ title: web.ctx # web.ctx -问题 -------- +## 问题 如何在代码中得到客户端信息?比如:来源页面(referring page)或是客户端浏览器类型 -解法 --------- +## 解法 使用web.ctx即可。首先讲一点架构的东西:web.ctx基于threadeddict类,又被叫做ThreadDict。这个类创建了一个类似字典(dictionary-like)的对象,对象中的值都是与线程id相对应的。这样做很妙,因为很多用户同时访问系统时,这个字典对象能做到仅为某一特定的HTTP请求提供数据(因为没有数据共享,所以对象是线程安全的) web.ctx保存每个HTTP请求的特定信息,比如客户端环境变量。假设,我们想知道正在访问某页面的用户是从哪个网页跳转而来的: -例子 -------- +## 例子 class example: def GET(self): @@ -29,8 +26,7 @@ web.ctx保存每个HTTP请求的特定信息,比如客户端环境变量。假 web.ctx另一个特性,是它可以被loadhook赋值。例如:当一个请求被处理时,会话(Session)就会被设置并保存在web.ctx中。由于web.ctx是线程安全的,所以我们可以象使用普通的python对象一样,来操作会话(Session)。 -'ctx'中的数据成员 -------------------- +## 'ctx'中的数据成员 ### Request ### * `environ` 又被写做. `env` – 包含标准WSGI环境变量的字典。 diff --git a/cookbook/index.fr.md b/cookbook/index.fr.md index 52aa8e9c..0cdf67a1 100644 --- a/cookbook/index.fr.md +++ b/cookbook/index.fr.md @@ -22,7 +22,7 @@ La version actuelle 0.3 est la branche développement. 1. Cette documentation est finalement pour la version 0.3, donc veuillez ajouter du code qui ne fonctionne qu'avec cette version. -------------------------------------------------- +--- ## Basique: diff --git a/cookbook/index.ja.md b/cookbook/index.ja.md index 383be1d0..8b73ee77 100644 --- a/cookbook/index.ja.md +++ b/cookbook/index.ja.md @@ -21,7 +21,7 @@ web.py 0.3 ベースのCookbookスタイルのドキュメントです。 1. 最後に、このドキュメンテーションはバージョン 0.3向けですので、あなたの知っている新バージョン用のコードを加えてください。 -------------------------------------------------- +--- ## Basics: * [Hello World](/helloworld/ja) diff --git a/cookbook/index.zh-cn.md b/cookbook/index.zh-cn.md index af6aeba8..4de496ac 100644 --- a/cookbook/index.zh-cn.md +++ b/cookbook/index.zh-cn.md @@ -18,7 +18,7 @@ title: Web.py Cookbook 简体中文版 1. 该手册适用于0.3版本,所以您在添加代码时,请确认代码能在新版本中工作。 -------------------------------------------------- +--- ## 基本应用 diff --git a/cookbook/staticfiles.fr.md b/cookbook/staticfiles.fr.md index 3ec1cf33..63ee2a09 100644 --- a/cookbook/staticfiles.fr.md +++ b/cookbook/staticfiles.fr.md @@ -7,12 +7,10 @@ title: Servir des fichiers statiques (tels que .js, .css et des images) Autre langages: [English](/../staticfiles) | ... -Probleme -------- +## Probleme Comment servir des fichiers statiques ? -Solution --------- +## Solution ### Serveur web.py diff --git a/cookbook/template_jinja.md b/cookbook/template_jinja.md index 87570e36..ac268dc4 100644 --- a/cookbook/template_jinja.md +++ b/cookbook/template_jinja.md @@ -44,9 +44,9 @@ if __name__ == "__main__": ### Template file: templates/hello.html -~~~ +``` Hello, {{ name }}. -~~~ +``` ### Solution 2 diff --git a/cookbook/template_jinja.zh-cn.md b/cookbook/template_jinja.zh-cn.md index 38e81fb4..d8d8d2a3 100644 --- a/cookbook/template_jinja.zh-cn.md +++ b/cookbook/template_jinja.zh-cn.md @@ -44,6 +44,6 @@ if __name__ == "__main__": ### 模板文件: templates/hello.html -~~~ +``` Hello, {{ name }}. -~~~ +``` diff --git a/cookbook/where_dict.md b/cookbook/where_dict.md index 4dc3db94..c2eecf0c 100644 --- a/cookbook/where_dict.md +++ b/cookbook/where_dict.md @@ -5,13 +5,11 @@ title: Using a dictionary as where clause # Using a dictionary as where clause -Problem -------- +## Problem You want to create a dictionary of where clauses dynamically and use it in a query. -Solution --------- +## Solution >>> import web >>> db = web.database(dbn='postgres', db='mydb', user='postgres') @@ -19,8 +17,7 @@ Solution >>> db.delete('mytable', where=web.db.sqlwhere(where_dict), _test=True) -Explanation ------------ +## Explanation `web.db.sqlwhere` takes a Python dictionary as an argument and converts it into a string useful for where clause in different queries. You can also use an optional `grouping` argument to define the exact gouping of the individual keys. For instance: diff --git a/cookbook/where_dict.zh-cn.md b/cookbook/where_dict.zh-cn.md index 591a625b..df686c36 100644 --- a/cookbook/where_dict.zh-cn.md +++ b/cookbook/where_dict.zh-cn.md @@ -1,17 +1,15 @@ ---- -layout: default -title: 使用字典动态构造where子句 ---- - -# 使用字典动态构造where子句 - -问题 -------- +--- +layout: default +title: 使用字典动态构造where子句 +--- + +# 使用字典动态构造where子句 + +## 问题 你希望创建一个字典来构造动态的where子句并且希望能够在查询语句中使用。 -解决 --------- +## 解决 >>> import web >>> db = web.database(dbn='postgres', db='mydb', user='postgres') @@ -19,8 +17,7 @@ title: 使用字典动态构造where子句 >>> db.delete('mytable', where=web.db.sqlwhere(where_dict), _test=True) -解释 ------------ +## 解释 `web.db.sqlwhere` takes a Python dictionary as an argument and converts it into a string useful for where clause in different queries. You can also use an optional `grouping` argument to define the exact gouping of the individual keys. For instance: diff --git a/docs/0.2/tutorial2.ru.md b/docs/0.2/tutorial2.ru.md index 98a55ac9..f6d6715d 100644 --- a/docs/0.2/tutorial2.ru.md +++ b/docs/0.2/tutorial2.ru.md @@ -176,13 +176,11 @@ Cоздадим каталог для наших темплейтов (назо В общем это всё к чему - теперь вы можете добавлять новые элементы в список. -Объект-хранилище ----------------- +## Объект-хранилище И **web.input**, и **web.query**, а также большинство других функций **web.py** возвращают в качестве результата объект-хранилище. Этот объект похож на стандартный dictionary языка python, однако позволяет обращаться к элементам не только через d['figna'], но и d.figna, что на 3 символа короче :) -Куки ----- +## Куки А также спамы и трояны... diff --git a/docs/0.3.fr/todo.md b/docs/0.3.fr/todo.md index 4d814de2..39f26d5f 100644 --- a/docs/0.3.fr/todo.md +++ b/docs/0.3.fr/todo.md @@ -16,7 +16,7 @@ Ici sera réunie la liste des travaux à réaliser et ceux en cours de réalisat 1. Les chemins des pages traduites devront ressembler à l'exemple ci-dessous et respecter la hierarchie du schéma anglais: *cookbook/helloworld* --> *cookbook/helloworld/fr* -------------------------------------------------- +--- # En cours diff --git a/docs/0.3/todo.fr.md b/docs/0.3/todo.fr.md index 8694e596..06d09097 100644 --- a/docs/0.3/todo.fr.md +++ b/docs/0.3/todo.fr.md @@ -16,7 +16,7 @@ Ici sera réunie la liste des travaux à réaliser et ceux en cours de réalisat 1. Les chemins des pages traduites devront ressembler à l'exemple ci-dessous et respecter la hierarchie du schéma anglais: *cookbook/helloworld* --> *cookbook/helloworld/fr* -------------------------------------------------- +--- # En cours diff --git a/docs/work.md b/docs/work.md index 5510d237..bc305cda 100644 --- a/docs/work.md +++ b/docs/work.md @@ -11,12 +11,13 @@ We need both reporters (tell us what's wrong!) and fixers (write code, make cont When adding work to be done, please place it in a section devoted to the page and/or parent page, and a link to that page. For example: -*** +--- + # Cookbook: [Cookbook](/cookbook) * database select example code is incorrect -*** +--- When finishing working on something, delete it from the list. If a code block refers to old (version 0.2 for example) code, please add it to a separate url. Also, add new content at new url (and delete old link when done) For instance: @@ -25,7 +26,8 @@ When finishing working on something, delete it from the list. If a code block re 1. put new code at /foo/0.3 1. delete content at /foo, and update any urls that link to it -*** +--- + # Code samples: [Code samples](https://github.com/webpy/webpy-examples/) * Move url to /samples @@ -56,4 +58,4 @@ vhost, metaclass and multiple apps should have separate section, but this setup * Leave them external, but annotate which version of webpy they use. -*** +--- From 78a34d82a997f8d7ea1789024c570f503e4b27ec Mon Sep 17 00:00:00 2001 From: nattheriddle1 <69092489+nattheriddle1@users.noreply.github.com> Date: Wed, 3 Aug 2022 11:33:28 -0500 Subject: [PATCH 13/13] Cleaned up lists Made ordered list delimiters sequential. Converted unordered list delimiters to asterisks. Made quotation list citation scheme consistent across languages. --- cookbook/fastcgi-apache.md | 4 ++-- cookbook/fastcgi-apache.zh-cn.md | 17 +++++++-------- cookbook/select.md | 4 ++-- cookbook/userauthpgsql.md | 24 ++++++++++----------- cookbook/userauthpgsql.zh-cn.md | 18 ++++++++-------- docs/work.md | 6 +++--- index.es.md | 10 ++++----- index.fr.md | 36 ++++++++++++++++---------------- index.md | 16 +++++++------- 9 files changed, 66 insertions(+), 69 deletions(-) diff --git a/cookbook/fastcgi-apache.md b/cookbook/fastcgi-apache.md index ea5e47b5..601da4ca 100644 --- a/cookbook/fastcgi-apache.md +++ b/cookbook/fastcgi-apache.md @@ -70,8 +70,8 @@ Note the following line is required: `web.wsgi.runwsgi = lambda func, addr=None: ### Run 1. Start your server. -1. Open your application with your browser -1. To confirm your application is running try: +2. Open your application with your browser +3. To confirm your application is running try: ``` ps aux | grep code.py diff --git a/cookbook/fastcgi-apache.zh-cn.md b/cookbook/fastcgi-apache.zh-cn.md index 6a6abd92..0025779d 100644 --- a/cookbook/fastcgi-apache.zh-cn.md +++ b/cookbook/fastcgi-apache.zh-cn.md @@ -13,6 +13,7 @@ title: Web.py using FastCGI and Apache 2 * [Flup](http://trac.saddi.com/flup) Note, on CentOS compiling mod_fcgid requires apache-devel be installed (available via yum). + # Apache Configuration Replace '/var/www/myapp/' with the path to your apps directory @@ -70,31 +71,27 @@ web.wsgi.runwsgi = lambda func, addr=None: web.wsgi.runfcgi(func, addr) # Run 1. Start your server. -1. Open your application with your browser -1. To confirm your application is running try: +2. Open your application with your browser +3. To confirm your application is running try: - +``` ps aux | grep code.py - +``` # Troubleshooting -
### Check your apache error log for information! -
## Common problems -
- ### File permissions. You might see error code 255 in your logs. Ensure the directory is readable and that code. py is executable: - +``` chmod +x code.py - +``` ### 404 Not Found. diff --git a/cookbook/select.md b/cookbook/select.md index 523191df..6d0fa1cf 100644 --- a/cookbook/select.md +++ b/cookbook/select.md @@ -54,8 +54,8 @@ print(results[1]) # works too If SQL column is defined as binary format, e.g. `VARBINARY` in MySQL/MariaDB, `BYTEA` in PostgreSQL, returned value will be a `bytes` string, not `str`. For example: 1. Create a SQL table in MySQL/MariaDB with command: `CREATE TABLE mytable (email VARBINARY(255));` -1. Insert a sample record: `INSERT INTO mytable (email) VALUES ("test@domain.com");` -1. Query it with web.py db module: +2. Insert a sample record: `INSERT INTO mytable (email) VALUES ("test@domain.com");` +3. Query it with web.py db module: ``` qr = db.select("mytable", what="email", limit=1) diff --git a/cookbook/userauthpgsql.md b/cookbook/userauthpgsql.md index a8454c00..6aaacf22 100644 --- a/cookbook/userauthpgsql.md +++ b/cookbook/userauthpgsql.md @@ -38,8 +38,8 @@ First of all, we need a table for the users. This scheme is very simple, but is There will be 2 states during the login/logout session: -- "Login" is for the login page -- "Reset" for the logout page. +* "Login" is for the login page +* "Reset" for the logout page. *sessions doesn't work in [debug](./tutorial#developing) mode because it interfere with reloading. see [session_with_reloader](session_with_reloader) for more details.* @@ -97,8 +97,8 @@ def create_render(privilege): Now, let's have fun: -- If you are already logged, you are redirecting to the login_double.html template file -- Else, to the login.html. +* If you are already logged, you are redirecting to the login_double.html template file +* Else, to the login.html. ``` class Login: @@ -111,10 +111,10 @@ class Login: return '%s' % render.login() ``` -- Ok, ok. Now, for the POST(). According to the .html file, we recover the variables posted in the form (see the login.html), and we compare it to the example_users.user row. -- For security, we don't store passwords in the database directly, but store the hash of the password + salt; this is kind of line one-way encryption, so we can tell if the user's passwords match, but an attacker couldn't figure out what the password was to start with. -- If the login/pass is ok, redirect to the login_ok.html. -- If not, redirect to the login_error.html. +* Ok, ok. Now, for the POST(). According to the .html file, we recover the variables posted in the form (see the login.html), and we compare it to the example_users.user row. +* For security, we don't store passwords in the database directly, but store the hash of the password + salt; this is kind of line one-way encryption, so we can tell if the user's passwords match, but an attacker couldn't figure out what the password was to start with. +* If the login/pass is ok, redirect to the login_ok.html. +* If not, redirect to the login_error.html. def POST(self): name, passwd = web.input().name, web.input().passwd @@ -169,7 +169,7 @@ Well, I think that nobody will need this, but, I prefer to give all the informat ## 7th: Some problems or questions ? -- Mail: you can contact me at guillaume(at)process-evolution(dot)fr -- IRC: #webpy on irc.freenode.net (pseudo: Ephedrax) -- Translations: I'm french, and my english is bad...you can edit my work -- Revision: Vayn +* Mail: you can contact me at guillaume(at)process-evolution(dot)fr +* IRC: #webpy on irc.freenode.net (pseudo: Ephedrax) +* Translations: I'm french, and my english is bad...you can edit my work +* Revision: Vayn diff --git a/cookbook/userauthpgsql.zh-cn.md b/cookbook/userauthpgsql.zh-cn.md index f081fe7a..c5e199bc 100644 --- a/cookbook/userauthpgsql.zh-cn.md +++ b/cookbook/userauthpgsql.zh-cn.md @@ -40,8 +40,8 @@ CREATE TABLE example_users ( 登录和注销对应两个网址: -- "Login" 对应登录页 -- "Reset" 对应注销页 +* "Login" 对应登录页 +* "Reset" 对应注销页 urls = ( '/login', 'login', @@ -95,8 +95,8 @@ CREATE TABLE example_users ( ## 第五:登录(Login)和注销(Reset)的python类 现在,让我们用个轻松的方法来解决: -- 如果你已登录,就直接重定向到login_double.html模板文件 -- 否则,还是到login.html。 +* 如果你已登录,就直接重定向到login_double.html模板文件 +* 否则,还是到login.html。 class login: def GET(self): @@ -107,9 +107,9 @@ CREATE TABLE example_users ( render = create_render(session.privilege) return "%s" % (render.login()) -- 好了。现在写POST()方法。从.html文件中,我们得到表单提交的变量值(见login.html),并根据变量值得到example_users表中对应的user数据 -- 如果登录通过了,就重定向到login_ok.html。 -- 如果没通过,就重定向到login_error.html。 +* 好了。现在写POST()方法。从.html文件中,我们得到表单提交的变量值(见login.html),并根据变量值得到example_users表中对应的user数据 +* 如果登录通过了,就重定向到login_ok.html。 +* 如果没通过,就重定向到login_error.html。 def POST(self): user, passwd = web.input().user, web.input().passwd @@ -165,5 +165,5 @@ CREATE TABLE example_users ( ## 第七:问题或疑问? -- 邮件:您可以联想我,我的邮箱是guillaume(at)process-evolution(dot)fr -- IRC:#webpy on irc.freenode.net (pseudo: Ephedrax) +* 邮件:您可以联想我,我的邮箱是guillaume(at)process-evolution(dot)fr +* IRC:#webpy on irc.freenode.net (pseudo: Ephedrax) diff --git a/docs/work.md b/docs/work.md index bc305cda..0e37b5f6 100644 --- a/docs/work.md +++ b/docs/work.md @@ -22,9 +22,9 @@ When adding work to be done, please place it in a section devoted to the page an When finishing working on something, delete it from the list. If a code block refers to old (version 0.2 for example) code, please add it to a separate url. Also, add new content at new url (and delete old link when done) For instance: 1. /foo is out of date with version 0.2 code -1. move /foo to /foo/0.2 -1. put new code at /foo/0.3 -1. delete content at /foo, and update any urls that link to it +2. move /foo to /foo/0.2 +3. put new code at /foo/0.3 +4. delete content at /foo, and update any urls that link to it --- diff --git a/index.es.md b/index.es.md index cacfde99..179f0cd6 100644 --- a/index.es.md +++ b/index.es.md @@ -52,20 +52,20 @@ web.py fue publicado originalmente cuando Aaron Swartz trabajaba en [reddit.com] ### Algunos testimonios de usuarios: * "En el ecosistema de los frameworks web, alguno debe ocupar el nicho de 'pequeño, ligero y rápido': web.py hace eso."* -  —  Lloyd Dalton, [colr.org](http://colr.org) +— Lloyd Dalton, [colr.org](http://colr.org) * "Hemos terminado de reescribir nuestro servidor en apenas unos días con la ayuda de web.py y tuvo todo lo que esperábamos."* -  —  Sam Hsiung, [YouOS][25] +— Sam Hsiung, [YouOS][25] [25]: http://www.youos.com/ * "[Web.py inspiró] el web framework que usamos en FriendFeed [y] el framework para aplicaciones web que se entrega con App Engine..."* -  —  [Brett Taylor](http://backchannel.org/blog/google-app-engine), co-fundador de FriendFeed y líder técnico original en Google App Engine +— Brett Taylor](http://backchannel.org/blog/google-app-engine), co-fundador de FriendFeed y líder técnico original en Google App Engine * "Django te permite escribir aplicaciones web en Django. TurboGears te permite escribir aplicaciones web en TurboGears. Web.py te permite escribir aplicaciones web en Python."* -  —  Alice Atlas +— Alice Atlas * "Guido* [van Rossum, creador de Python]*, probablemente encuentres que web.py es el que mejor se ajusta a tu estilo. ... Si no te gusta, no puedo imaginarme cual de la otra docena de frameworks existentes te __puede__ gustar."* -  —  Phillip J. Eby, creador de Python Web Server Gateway Interface (WSGI) [#][30] +— Phillip J. Eby, creador de Python Web Server Gateway Interface (WSGI) [#][30] [30]: http://www.artima.com/forums/flat.jsp?forum=106&thread=146149&start=30&msRange=15 diff --git a/index.fr.md b/index.fr.md index 7320355f..ad4a1607 100644 --- a/index.fr.md +++ b/index.fr.md @@ -75,44 +75,44 @@ web.py a été publié alors que Aaron Swartz travaillait sur [reddit.com][20], ### Appréciations des -"Dans l'écosystème des frameworks web, quelque chose doit occuper le créneau du "petit, léger et rapide". web.py est celui-là." -- Lloyd Dalton, [colr.org](http://colr.org) +* "Dans l'écosystème des frameworks web, quelque chose doit occuper le créneau du "petit, léger et rapide". web.py est celui-là." +— Lloyd Dalton, [colr.org](http://colr.org) -"Nous avons terminé la réécriture de notre serveur il y a quelques jours avec web.py et c'était tout ce que nous souhaitions." -- Sam Hsiung, [YouOS][25] +* "Nous avons terminé la réécriture de notre serveur il y a quelques jours avec web.py et c'était tout ce que nous souhaitions." +— Sam Hsiung, [YouOS][25] [25]: http://www.youos.com/ -"Django vous permet d'écrire des applications web en Django. TurboGears vous permet d'écrire des applications web en TurboGears. Web.py vous permet d'écrire des applications web en Python." -- Alice Atlas +* "Django vous permet d'écrire des applications web en Django. TurboGears vous permet d'écrire des applications web en TurboGears. Web.py vous permet d'écrire des applications web en Python." +— Alice Atlas -"Très élégant et concis (sans oublier que c'est écrit par Aaron Swartz, dont les compétences en codage sont impressionnantes), et ça ne m'a pas fait perdre de temps." -- Jonas Galvez, Aupeo [#][26] +* "Très élégant et concis (sans oublier que c'est écrit par Aaron Swartz, dont les compétences en codage sont impressionnantes), et ça ne m'a pas fait perdre de temps." +— Jonas Galvez, Aupeo [#][26] [26]: http://www.artima.com/forums/flat.jsp?forum=106&thread=146149 -"Le premier framework ... sur lequel je peux bidouiller du code et voir quelque chose fonctionner sans même être obligé de comprendre la logique de celui-ci. Un plaisir à intégrer." -- Delaunay Antoine built [a photo gallery][28] and [an agenda][34] with it +* "Le premier framework ... sur lequel je peux bidouiller du code et voir quelque chose fonctionner sans même être obligé de comprendre la logique de celui-ci. Un plaisir à intégrer." +— Delaunay Antoine built [a photo gallery][28] and [an agenda][34] with it [28]: http://github.com/antoine/ibrouteur/ [34]: http://metagenda.org -"Guido [van Rossum, Créateur de Python], vous constaterez probablement que web.py convient le mieux à votre style. ...Si vous ne l'aimez pas, je ne peux imaginer lequel des autres douzaines d'autres framework sortis vous *pourriez* aimer." -- Phillip J. Eby, créateur du Python Web Server Gateway Interface (WSGI) [#lien][30] +* "Guido [van Rossum, Créateur de Python], vous constaterez probablement que web.py convient le mieux à votre style. ...Si vous ne l'aimez pas, je ne peux imaginer lequel des autres douzaines d'autres framework sortis vous *pourriez* aimer." +— Phillip J. Eby, créateur du Python Web Server Gateway Interface (WSGI) [#lien][30] [30]: http://www.artima.com/forums/flat.jsp?forum=106&thread=146149&start=30&msRange=15 -"... l'exemple [Cheetah] que j'ai vu sur web.py à l'air "bon". (web.py itself OTOH gets an "F", for undocumented code with too much magic behavior. upvars(), bah.)" [ Note traducteur : A préciser] -- Guido van Rossum, Créateur de Python [#Lien][31] +* "... l'exemple [Cheetah] que j'ai vu sur web.py à l'air "bon". (web.py itself OTOH gets an "F", for undocumented code with too much magic behavior. upvars(), bah.)" [ Note traducteur : A préciser] +— Guido van Rossum, Créateur de Python [#Lien][31] [31]: http://www.artima.com/weblogs/viewpost.jsp?thread=146503 -"il suffit de dire je crois, que Aaron se dirige dans la bonne direction." -- Harry Fuecks: [un simple wiki avec web.py][32] +* "il suffit de dire je crois, que Aaron se dirige dans la bonne direction." +— Harry Fuecks: [un simple wiki avec web.py][32] [32]: http://www.sitepoint.com/blogs/2006/01/06/a-simple-wiki-with-webpy/ -"un moment très fascinant pour moi. Le même sentiment que j'ai eu lorsque j'ai écrit pour la première fois un script PHP. il est certain que ça me permettra d'apprendre python de façon amusante. Bon travail Aaron !" -- Kamal [Un simple blog en webpy, apprendre python de façon amusante][33] +* "un moment très fascinant pour moi. Le même sentiment que j'ai eu lorsque j'ai écrit pour la première fois un script PHP. il est certain que ça me permettra d'apprendre python de façon amusante. Bon travail Aaron !" +— Kamal [Un simple blog en webpy, apprendre python de façon amusante][33] [33]: http://www.k4ml.com/node/165 diff --git a/index.md b/index.md index a3f9a486..c276313d 100644 --- a/index.md +++ b/index.md @@ -59,16 +59,16 @@ web.py was originally published while Aaron Swartz worked at [reddit.com][20], w ### Some user testimonials: -* "In the ecosystem of web frameworks, something must occupy the niche of 'small, light, and fast': web.py does this."* -  —  Lloyd Dalton, [colr.org](http://colr.org) +* "In the ecosystem of web frameworks, something must occupy the niche of 'small, light, and fast': web.py does this."* +— Lloyd Dalton, [colr.org](http://colr.org) -* "[Web.py inspired the] web framework we use at FriendFeed [and] the webapp framework that ships with App Engine..."* -  —  [Brett Taylor](http://backchannel.org/blog/google-app-engine), co-founder of FriendFeed and original tech lead on Google App Engine +* "[Web.py inspired the] web framework we use at FriendFeed [and] the webapp framework that ships with App Engine..."* +— [Brett Taylor](http://backchannel.org/blog/google-app-engine), co-founder of FriendFeed and original tech lead on Google App Engine -* "Django lets you write web apps in Django. TurboGears lets you write web apps in TurboGears. Web.py lets you write web apps in Python."* -  —  Alice Atlas +* "Django lets you write web apps in Django. TurboGears lets you write web apps in TurboGears. Web.py lets you write web apps in Python."* +— Alice Atlas -* "Guido* [van Rossum, creator of Python]*, you'll probably find that web.py best suits your style. ... If you don't like it, I can't imagine which of the other dozens of frameworks out there you __would__ like."* -  —  Phillip J. Eby, creator of the Python Web Server Gateway Interface (WSGI) [#][30] +* "Guido* [van Rossum, creator of Python]*, you'll probably find that web.py best suits your style. ... If you don't like it, I can't imagine which of the other dozens of frameworks out there you __would__ like."* +— Phillip J. Eby, creator of the Python Web Server Gateway Interface (WSGI) [#][30] [30]: http://www.artima.com/forums/flat.jsp?forum=106&thread=146149&start=30&msRange=15