Weitere ähnliche Inhalte
Ähnlich wie Real world Python+django (20)
Kürzlich hochgeladen (20)
Real world Python+django
- 17. Isolate environments
$ virtualenv env!
$ source env/bin/activate!
!
Check your deps
$ pip freeze!
!
Django == 1.5.4!
Fabric == 1.7.0!
MySQL-python == 1.2.4!
PIL == 1.1.7!
PyRSS2Gen == 1.0.0!
South == 0.8.1!
- 18. Freeze your deps
$ pip freeze > requirements.txt!
Recreate env
$ pip install –r requirements.txt!
- 20. Public and internal interfaces
Code layout
Comments
Coding style = PEP8
http://www.python.org/dev/peps/pep-0008/
Naming conventions
Programming conventions