gae python gdg milano l05
TRANSCRIPT
![Page 1: Gae python GDG Milano L05](https://reader034.vdocuments.pub/reader034/viewer/2022042511/55c09541bb61eb225a8b473a/html5/thumbnails/1.jpg)
App Engine Take OffGiugno 2015Python
GDG Milano - Paolo Dadda - 2DWebMilano, 3 giugno 2015 @Ordine Ing. Milano, Via Andrea Doria, 9
#gae #gdgmilano
![Page 2: Gae python GDG Milano L05](https://reader034.vdocuments.pub/reader034/viewer/2022042511/55c09541bb61eb225a8b473a/html5/thumbnails/2.jpg)
Maggio 2015Google App Engine
Python
#gae #gdgmilano
Paolo Dadda
Membro IWA ITALY nr. 0307429 Professionista Web ai sensi della Legge 4/2013
Contatti:Tel.: 393.4298004
Ufficio: Via 4 Novembre, 94 Cislago (VA) WebSite: www.2dweb.it
Mail: [email protected]
![Page 3: Gae python GDG Milano L05](https://reader034.vdocuments.pub/reader034/viewer/2022042511/55c09541bb61eb225a8b473a/html5/thumbnails/3.jpg)
Cosa vedremo oggi?
- Template & Jinja2- Exception
- CodeLab !
Piano delle lezioni Lezione 1 (Febbraio 2015)
Introduzione Lezione 2 (Marzo 2015)
WebApp2 & Basi per uso di Model, Template, Handler Lezione 3 (Aprile 2015)
Handler, Mail, Get, Post Lezione 4 (Maggio 2015)
Model, Upload, Memcache Lezione 5 (3 Giugno 2015)
Template, Jinja2, Exception Lezione 6 (18 Giugno 2015)
Blobstore & Google Cloud Storage
![Page 4: Gae python GDG Milano L05](https://reader034.vdocuments.pub/reader034/viewer/2022042511/55c09541bb61eb225a8b473a/html5/thumbnails/4.jpg)
Cos’è un template system?
![Page 5: Gae python GDG Milano L05](https://reader034.vdocuments.pub/reader034/viewer/2022042511/55c09541bb61eb225a8b473a/html5/thumbnails/5.jpg)
Template Jinja2
i template system ci permettonodi dividere la logica dalla grafica
![Page 6: Gae python GDG Milano L05](https://reader034.vdocuments.pub/reader034/viewer/2022042511/55c09541bb61eb225a8b473a/html5/thumbnails/6.jpg)
Jinja2
Jinja2 è un motore di template per Python.
Si ispira sistema di template di Django, ma si estende con un linguaggio espressivo che dà agli autori dei modelli più potente set di strumenti.
L'esecuzione può essere fatta in sandbox, utile per siti e applicazioni in cui la sicurezza è importante.
![Page 8: Gae python GDG Milano L05](https://reader034.vdocuments.pub/reader034/viewer/2022042511/55c09541bb61eb225a8b473a/html5/thumbnails/8.jpg)
Jinja2Fonte: http://jinja.pocoo.org/docs/dev/
http://jinja.pocoo.org/docs/dev/templates/#builtin-filters
![Page 9: Gae python GDG Milano L05](https://reader034.vdocuments.pub/reader034/viewer/2022042511/55c09541bb61eb225a8b473a/html5/thumbnails/9.jpg)
Jinja2Fonte: http://jinja.pocoo.org/docs/dev/
http://jinja.pocoo.org/docs/dev/templates/#builtin-tests
![Page 12: Gae python GDG Milano L05](https://reader034.vdocuments.pub/reader034/viewer/2022042511/55c09541bb61eb225a8b473a/html5/thumbnails/12.jpg)
Exception
La gestione delle eccezioni è quella di python.
In un progetto, generalmente vengono impiegati:- Webapp2- Jinja2- Datastore
Più altre eventuali librerie esterne.
Per ogni libreria esistono delle cas i s t i che d i eccez ion i che l’applicazione può sollevare.
![Page 13: Gae python GDG Milano L05](https://reader034.vdocuments.pub/reader034/viewer/2022042511/55c09541bb61eb225a8b473a/html5/thumbnails/13.jpg)
Exception
DataStore https://cloud.google.com/appengine/docs/python/datastore/exceptions
NDB https://cloud.google.com/appengine/docs/python/ndb/exceptions
BlobStore https://cloud.google.com/appengine/docs/python/blobstore/exceptions
![Page 14: Gae python GDG Milano L05](https://reader034.vdocuments.pub/reader034/viewer/2022042511/55c09541bb61eb225a8b473a/html5/thumbnails/14.jpg)
Exception
![Page 15: Gae python GDG Milano L05](https://reader034.vdocuments.pub/reader034/viewer/2022042511/55c09541bb61eb225a8b473a/html5/thumbnails/15.jpg)
Exception
![Page 16: Gae python GDG Milano L05](https://reader034.vdocuments.pub/reader034/viewer/2022042511/55c09541bb61eb225a8b473a/html5/thumbnails/16.jpg)
Risorse e codice:
Documentazione GAE Python:https://cloud.google.com/appengine/docs/python/ Documentazione Jinja2:http://jinja.pocoo.org/docs/dev/
Cartella dedicata all’eventohttp://bit.ly/eventi-gdg-milano (Aprire poi la cartella App Engine Take Off)
Indirizzo per questa slide:http://www.slideshare.net/ilpaolino/gae-python-gdg-milano-l05
Domande??? ?
![Page 17: Gae python GDG Milano L05](https://reader034.vdocuments.pub/reader034/viewer/2022042511/55c09541bb61eb225a8b473a/html5/thumbnails/17.jpg)
Pausa Caffè, poi CodeLab! 5 minuti
![Page 18: Gae python GDG Milano L05](https://reader034.vdocuments.pub/reader034/viewer/2022042511/55c09541bb61eb225a8b473a/html5/thumbnails/18.jpg)
CodeLab !
Realizziamo la terza parte del sito sull’Evento Tal dei Tali
• Realizzare nuove pagine estendendo le attuali già presenti
• Generare volontariamente un errore ed esaminare l’errore, per comprendere meglio come leggerli
• Rivediamo concetti non chiari degli incontri precedenti