Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Cleaned up lists
Made ordered list delimiters sequential. Converted unordered list delimiters to asterisks. Made quotation list citation scheme consistent across languages.
  • Loading branch information
nattheriddle1 committed Aug 3, 2022
commit 78a34d82a997f8d7ea1789024c570f503e4b27ec
4 changes: 2 additions & 2 deletions cookbook/fastcgi-apache.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
17 changes: 7 additions & 10 deletions cookbook/fastcgi-apache.zh-cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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:

<code>
```
ps aux | grep code.py
</code>
```

# Troubleshooting

<br>
### Check your apache error log for information!

<br>
## Common problems

<br>

### File permissions.

You might see error code 255 in your logs.
Ensure the directory is readable and that code. py is executable:

<code>
```
chmod +x code.py
</code>
```

### 404 Not Found.

Expand Down
4 changes: 2 additions & 2 deletions cookbook/select.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
24 changes: 12 additions & 12 deletions cookbook/userauthpgsql.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.*

Expand Down Expand Up @@ -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:
Expand All @@ -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
Expand Down Expand Up @@ -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 <vayn at vayn dot de>
* 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 <vayn at vayn dot de>
18 changes: 9 additions & 9 deletions cookbook/userauthpgsql.zh-cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ CREATE TABLE example_users (

登录和注销对应两个网址:

- "Login" 对应登录页
- "Reset" 对应注销页
* "Login" 对应登录页
* "Reset" 对应注销页

urls = (
'/login', 'login',
Expand Down Expand Up @@ -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):
Expand All @@ -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
Expand Down Expand Up @@ -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)
6 changes: 3 additions & 3 deletions docs/work.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

---

Expand Down
10 changes: 5 additions & 5 deletions index.es.md
Original file line number Diff line number Diff line change
Expand Up @@ -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."*
<span class="cite">&nbsp;&nbsp;&mdash;&nbsp; Lloyd Dalton, [colr.org](http://colr.org)</span>
<span class="cite">&mdash; Lloyd Dalton, [colr.org](http://colr.org)</span>

* "Hemos terminado de reescribir nuestro servidor en apenas unos días con la ayuda de web.py y tuvo todo lo que esperábamos."*
<span class="cite">&nbsp;&nbsp;&mdash;&nbsp; Sam Hsiung, [YouOS][25]</span>
<span class="cite">&mdash; Sam Hsiung, [YouOS][25]</span>

[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..."*
<span class="cite">&nbsp;&nbsp;&mdash;&nbsp; [Brett Taylor](http://backchannel.org/blog/google-app-engine), co-fundador de FriendFeed y líder técnico original en Google App Engine</span>
<span class="cite">&mdash; Brett Taylor](http://backchannel.org/blog/google-app-engine), co-fundador de FriendFeed y líder técnico original en Google App Engine</span>

* "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."*
<span class="cite">&nbsp;&nbsp;&mdash;&nbsp; Alice Atlas</span>
<span class="cite">&mdash; Alice Atlas</span>

* "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."*
<span class="cite">&nbsp;&nbsp;&mdash;&nbsp; Phillip J. Eby, creador de Python Web Server Gateway Interface (WSGI) [#][30]</span>
<span class="cite">&mdash; Phillip J. Eby, creador de Python Web Server Gateway Interface (WSGI) [#][30]</span>

[30]: http://www.artima.com/forums/flat.jsp?forum=106&thread=146149&start=30&msRange=15
36 changes: 18 additions & 18 deletions index.fr.md
Original file line number Diff line number Diff line change
Expand Up @@ -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à."
<span class="cite">&mdash; Lloyd Dalton, [colr.org](http://colr.org)</span>

"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."
<span class="cite">&mdash; Sam Hsiung, [YouOS][25]</span>

[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."
<span class="cite">&mdash; Alice Atlas</span>

"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."
<span class="cite">&mdash; Jonas Galvez, Aupeo [#][26]</span>

[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."
<span class="cite">&mdash; Delaunay Antoine built [a photo gallery][28] and [an agenda][34] with it</span>

[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."
<span class="cite">&mdash; Phillip J. Eby, créateur du Python Web Server Gateway Interface (WSGI) [#lien][30]</span>

[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]
<span class="cite">&mdash; Guido van Rossum, Créateur de Python [#Lien][31]</span>

[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."
<span class="cite">&mdash; Harry Fuecks: [un simple wiki avec web.py][32]</span>

[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 !"
<span class="cite">&mdash; Kamal [Un simple blog en webpy, apprendre python de façon amusante][33]</span>

[33]: http://www.k4ml.com/node/165
16 changes: 8 additions & 8 deletions index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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."*
<span class="cite">&nbsp;&nbsp;&mdash;&nbsp; Lloyd Dalton, [colr.org](http://colr.org)</span>
* "In the ecosystem of web frameworks, something must occupy the niche of 'small, light, and fast': web.py does this."*
<span class="cite">&mdash; Lloyd Dalton, [colr.org](http://colr.org)</span>

* "[Web.py inspired the] web framework we use at FriendFeed [and] the webapp framework that ships with App Engine..."*
<span class="cite">&nbsp;&nbsp;&mdash;&nbsp; [Brett Taylor](http://backchannel.org/blog/google-app-engine), co-founder of FriendFeed and original tech lead on Google App Engine</span>
* "[Web.py inspired the] web framework we use at FriendFeed [and] the webapp framework that ships with App Engine..."*
<span class="cite">&mdash; [Brett Taylor](http://backchannel.org/blog/google-app-engine), co-founder of FriendFeed and original tech lead on Google App Engine</span>

* "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."*
<span class="cite">&nbsp;&nbsp;&mdash;&nbsp; Alice Atlas</span>
* "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."*
<span class="cite">&mdash; Alice Atlas</span>

* "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."*
<span class="cite">&nbsp;&nbsp;&mdash;&nbsp; Phillip J. Eby, creator of the Python Web Server Gateway Interface (WSGI) [#][30]</span>
* "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."*
<span class="cite">&mdash; Phillip J. Eby, creator of the Python Web Server Gateway Interface (WSGI) [#][30]</span>

[30]: http://www.artima.com/forums/flat.jsp?forum=106&thread=146149&start=30&msRange=15