Table of Contents
- 1. Coding Style
- 2. Layout Django Project
- 3. Setting Files
- 4. Model
- 5. Queries and the Database Layer
- 6. Function- and Class-Based Views
- 7. Function-Based Views
- 8. Class-Based Views
- 9. Form Fundamentals
- 10. Common Patterns for Forms
- 11. Templates
- 12. Template Tags and Filters
- 13. Building REST APIs
- 14. Working With the Django Admin
- 15. Dealing With the User Model
- 16. Third-Party Packages
- 17. Testing
- 17.1. Useful Library for Testing Django Projects
- 17.2. How to Structure Tests
- 17.3. How to Write Unit Tests
- 17.3.1. Each Test Method Tests One Thing
- 17.3.2. For Views, When Possible Use the Request Factory
- 17.3.3. Don't Repeat Yourself Doesn't Apply to Writing Tests
- 17.3.4. Don't Rely on Fixtures
- 17.3.5. Things That Should Be Tested
- 17.3.6. Test for Failure
- 17.3.7. Use Mock to Keep Unit Tests From Touching the World
- 17.3.8. Use Fancier Assertion Methods
- 17.3.9. Document the Purpose of Each Test
- 17.4. What About Integration Tests?
- 17.5. Continuous Integration
- 17.6. Setting Up the Test Coverage Game
- 18. Documentation
- 19. Finding and Reducing Bottlenecks
- 19.1. Should You Even Care?
- 19.2. Speed Up Query-Heavy Pages
- 19.3. Know What Doesn't Belong in the Database
- 19.4. Cache Queries With Memcached or Redis
- 19.5. Identify Specific Places to Cache
- 19.6. Compression and Minification of HTML, CSS, and JavaScript
- 19.7. Use Upstream Caching or a Content Delivery Network
- 20. Asynchronous Task Queues
- 21. Security
- 22. Logging
- 23. Signals: Use Cases and Avoidance Techniques
- 24. Utilities
- 25. Deployment:Platforms as a Service
- 26. Deploying Django Projects
- 27. Continuous Integration
- 28. Debugging
- 29. Internationalization and Localization
- 30. Security Settings Reference
- 31. Some Useful Packages
- 32. Reference
django學習筆記
隨筆亂記,陸續增加中