Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Real world Python+django

  • Login to see the comments

  • Be the first to like this

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

×