Monday, August 10, 2020

Talk Python to Me: #277 10 tips every Django developer should know

We recently covered 10 tips that every Flask developer should know. But we left out a pretty big group in the Python web space: Django developers! And this one is for you. I invited Bob Belderbos, who's been running his SaaS business on Python and Django for several years now, to share his tips and tricks. <br/> <h2>The 10 tips</h2><ol> <li>Django Admin</li><li>ORM magic</li><li>Models</li><li>Debugging/Performance Toolbar</li><li>Extending the User model</li><li>Class based views (CBVs)</li><li>manage.py</li><li>Write your own middleware</li><li>Config variable management with python-decouple and dj-database-url</li><li>Built-in template tags and filters</li></ol><br/> <br/> <strong>Links from the show</strong><br/> <br/> <div><b>Bob on Twitter</b>: <a href="https://twitter.com/bbelderbos" target="_blank" rel="noopener">@bbelderbos</a><br/> <b>Code Challenges Platform</b>: <a href="https://ift.tt/2qzcjK2" target="_blank" rel="noopener">codechalleng.es</a><br/> <b>PyBites</b>: <a href="https://pybit.es/" target="_blank" rel="noopener">pybit.es</a><br/> <br/> <b>Django admin</b>: <a href="https://ift.tt/3cQCa4d" target="_blank" rel="noopener">docs.djangoproject.com</a><br/> <b>Django admin cookbook</b>: <a href="https://ift.tt/2nHOGLG" target="_blank" rel="noopener">books.agiliq.com</a><br/> <b>Use some Django ORM magic to get the most common first names</b>: <a href="https://twitter.com/pybites/status/1181912492701822976" target="_blank" rel="noopener">twitter.com/pybites</a><br/> <b>Django custom manager</b>: <a href="https://ift.tt/33MRlJK" target="_blank" rel="noopener">riptutorial.com</a><br/> <b>Debug toolbar</b>: <a href="https://ift.tt/31ynFxm" target="_blank" rel="noopener">django-debug-toolbar.readthedocs.io</a><br/> <b>select_related</b>: <a href="https://ift.tt/3itoiiB" target="_blank" rel="noopener">docs.djangoproject.com</a><br/> <b>Extending the user model / working with signals / @receiver</b>: <a href="https://ift.tt/2e03Do1" target="_blank" rel="noopener">simpleisbetterthancomplex.com</a><br/> <b>Class-based views</b>: <a href="https://ift.tt/33IaZGZ" target="_blank" rel="noopener">docs.djangoproject.com</a><br/> <b>Comparing class and function-based views</b>: <a href="https://ift.tt/3itmGVW" target="_blank" rel="noopener">github.com/talkpython/100daysofweb</a><br/> <b>Example of class-based views</b>: <a href="https://ift.tt/2FcS2Sz" target="_blank" rel="noopener">github.com/talkpython/100daysofweb</a><br/> <b>Django command template</b>: <a href="https://ift.tt/31DoxAP" target="_blank" rel="noopener">gist.github.com</a><br/> <b>Django middleware example</b>: <a href="https://ift.tt/2XOJpUG" target="_blank" rel="noopener">gist.github.com</a><br/> <br/> <b>Config settings management:</b><br/> <b>python-decouple</b>: <a href="https://ift.tt/2CxnwRp" target="_blank" rel="noopener">pypi.org</a><br/> <b>dj-database-url</b>: <a href="https://ift.tt/2XK3nik" target="_blank" rel="noopener">pypi.org</a><br/> <br/> <b>Useful template tags and filters</b>: <a href="https://ift.tt/3gOxD3W" target="_blank" rel="noopener">docs.djangoproject.com</a><br/> <br/> <b>for-empty</b>: <a href="https://ift.tt/3kxp2VK" target="_blank" rel="noopener">gist.github.com</a><br/> <b>is_new filter example</b>: <a href="https://ift.tt/3fILZS3" target="_blank" rel="noopener">gist.github.com</a><br/> <b>Asynchronous Tasks with Django and Celery</b>: <a href="https://ift.tt/3gGyDqS" target="_blank" rel="noopener">testdriven.io</a><br/> <b>Celery debugging - CELERY_ALWAYS_EAGER</b>: <a href="https://twitter.com/pybites/status/1279432833518444544" target="_blank" rel="noopener">twitter.com/pybites</a><br/> <b>secure.py</b>: <a href="https://ift.tt/2uxqgr3" target="_blank" rel="noopener">github.com/TypeError/secure.py</a><br/> <b>django-tinymce</b>: <a href="https://ift.tt/1xGkE6l" target="_blank" rel="noopener">github.com/aljosa</a><br/> <br/> <b>Extra tools Michael mentioned</b><br/> <b>BeeKeeper Studio</b>: <a href="https://ift.tt/2KGim77" target="_blank" rel="noopener">beekeeperstudio.io</a><br/> <b>SimpleMDE</b>: <a href="https://simplemde.com/" target="_blank" rel="noopener">simplemde.com</a><br/> <b>Human time to Python parse string site (the one I forgot)</b>: <a href="https://pystrftime.com" target="_blank" rel="noopener">pystrftime.com</a><br/></div><br/> <strong>Sponsors</strong><br/> <br/> <a href='https://ift.tt/3aBjB2k> <a href='https://ift.tt/2PVc9qH Python Training</a>

from Planet Python
via read more

No comments:

Post a Comment

TestDriven.io: Working with Static and Media Files in Django

This article looks at how to work with static and media files in a Django project, locally and in production. from Planet Python via read...