Skip to content

Commit a6b4142

Browse files
committed
Merge pull request pythonclub#164 from erichideki/pelican
Changes for better comprehension of articles
2 parents 995da15 + d321479 commit a6b4142

2 files changed

Lines changed: 15 additions & 20 deletions

File tree

content/bottle-framework-full-stack-sem-ser-o-django.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
1-
Title: Desenvolvendo com Bottle - Parte 1
2-
Slug: desenvolvendo-com-bottle-parte-1
1+
Title: Bottle Framework full stack sem Django
2+
Slug: bottle-framework-full-stack-sem-django
33
Date: 2014-12-03 19:40
44
Tags: bottle,python
55
Author: Eric Hideki
66
Email: eric8197@gmail.com
77
Github: erichideki
88
Site: http://ericstk.wordpress.com
99
Twitter: erichideki
10-
Linkedin: erichideki
1110
Category: begginers, bottle, tutorial
1211

1312
# Bottle, framework full-stack sem Django
@@ -140,7 +139,6 @@ def downgrade():
140139
op.drop_column('account', 'last_transaction_date')
141140
```
142141

143-
144142
## Conclusão
145143

146144
Exatamente o que você vê, tudo o que o Django contém temos fora do conjunto do Django. Eu não escreveria esse artigo para falar mal do Django, e sim mostrar que existem outras soluções para desenvolvimento full stack. Muitas pessoas usam o Django mas não entendem o ambiente Python, hoje o Django traz muitas coisas preparadas que fazem alguns desenvolvedores serem preguiçosos e não adquirir experiência em arquitetura de software.

content/desenvolvendo-com-bottle-parte-1.md

Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,12 @@ Email: eric8197@gmail.com
77
Github: erichideki
88
Site: http://ericstk.wordpress.com
99
Twitter: erichideki
10-
Linkedin: erichideki
1110
Category: begginers, bottle, tutorial
1211

13-
14-
1512
Desenvolvendo com Bottle - Parte 1
16-
-----------
13+
-------
1714

18-
### Texto originalmente escrito em:
15+
# Texto originalmente escrito em:
1916

2017
[https://realpython.com/blog/python/developing-with-bottle-part-1/]
2118

@@ -81,15 +78,15 @@ Agora estamos preparados para escrever nossa aplicação com Bottle. Crie seu ar
8178
import os
8279
from bottle import route, run, template
8380
84-
index_html = '''My first web app! By {{ author }}'''
81+
index_html = '''Minha primeira aplicação! Por {{ autor }}'''
8582
86-
@route('/:anything')
87-
def something(anything=''):
88-
return template(index_html, author=anything)
83+
@route('/:qualquer')
84+
def alguma_coisa(qualquer=''):
85+
return template(index_html, autor=qualquer)
8986
9087
@route('/')
9188
def index():
92-
return template(index_html, author='your name here')
89+
return template(index_html, autor='Seu nome aqui:')
9390
9491
if __name__ == '__main__':
9592
port = int(os.environ.get('PORT', 8080))
@@ -134,15 +131,15 @@ cat >app.py <<EOF
134131
import os
135132
from bottle import route, run, template
136133
137-
index_html = '''My first web app! By {{=<% %>=}}{{ author }}<%={{ }}=%>'''
134+
index_html = '''Minha primeira aplicação wweb! Por {{=<% %>=}}{{ autor }}<%={{ }}=%>'''
138135
139-
@route('/:anything')
140-
def something(anything=''):
141-
return template(index_html, author=anything)
136+
@route('/:qualquer')
137+
def alguma_coisa(qualquer=''):
138+
return template(index_html, autor=qualquer)
142139
143140
@route('/')
144141
def index():
145-
return template(index_html, author='your name here')
142+
return template(index_html, autor='Seu nome aqui:')
146143
147144
if __name__ == '__main__':
148145
port = int(os.environ.get('PORT', 8080))
@@ -168,7 +165,7 @@ A partir desse ponto, é tão fácil adicionando uma nova ```@route```-decorated
168165

169166
Criar o HTML é simples: Nessa aplicação, nós apenas adicionamos HTML na mesma linha e arquivo.Isto é fácil de modificar(usando, por exemplo, ```open('index.html').read())``` para ler o template de um arquivo.
170167

171-
Referências para a [documentação] do Bottle para mais informações
168+
Referências para a [documentação] do Bottle para mais informações.
172169

173170
[https://realpython.com/blog/python/developing-with-bottle-part-1/]:https://realpython.com/blog/python/developing-with-bottle-part-1/
174171
[bottle]:http://bottlepy.org/docs/stable/

0 commit comments

Comments
 (0)