Real world Python+django

514 views

Published on

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
514
On SlideShare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
7
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Real world Python+django

  1. 1. Real world Joel Correa – Software engineer
  2. 2. View URL design Model There are some ordinary topics… Template I18n ORM Admin interface
  3. 3. Function-based views
  4. 4. But, guess what… There is much more
  5. 5. View ListView RedirectView Class-based views (CBVs) DetailView UpdateView TemplateView CreateView
  6. 6. Class-based views
  7. 7. Fixtures JSON SQL
  8. 8. Fixtures
  9. 9. Fixtures OK for very small, hard-coded datasets NOK for large datasets, and migrations
  10. 10. Fixtures OK for very small, hard-coded datasets NOK for large datasets, and migrations
  11. 11. Schema migration Data migration
  12. 12. Validating user input
  13. 13. Input validation layers Formset Form Model
  14. 14. Use pip
  15. 15. Managing packages $ pip install SomePackage==1.0! ! […]! Successfully installed SomePackage! !
  16. 16. Set up a virtualenv
  17. 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. 18. Freeze your deps $ pip freeze > requirements.txt! Recreate env $ pip install –r requirements.txt!
  19. 19. Coding style = PEP8 http://www.python.org/dev/peps/pep-0008/
  20. 20. Public and internal interfaces Code layout Comments Coding style = PEP8 http://www.python.org/dev/peps/pep-0008/ Naming conventions Programming conventions
  21. 21. RabbitMQ Celery Distributed task Queue IronMQ Amazon SQS
  22. 22. Real world Joel Correa – Software engineer

×