SLSeth Livingstoninsethl.hashnode.dev·Oct 11, 2019What happens when you use multiple inheritance in Python?If you're asking this question, then it's time for you to dive into the details of Python's method resolution order (MRO). There's no better place to start than The Python 2.3 Method Resolution Order by Michele Simionato. Not only is it a great overv...00
SLSeth Livingstoninsethl.hashnode.dev·Jul 22, 2019The Solution to Your Python Problem Is a Probably a ComprehensionI got 99 problems and comprehensions solved all but one. --Not Jay Z More times than I can count, I have looked up the best way to solve a problem in Python only to say, "Oh, a comprehension, I should have known." What can you do with a comprehensio...00
SLSeth Livingstoninsethl.hashnode.dev·Jul 18, 2019How to Make Preset Cloudinary Transformations Available to Django Template TagsCloudinary preset (or named) transformations are powerful ways to group together dynamic alterations to your images. For example, you can create a "default" transformation for your website: DEFAULT = dict( format='auto', quality='auto:good',...00
SLSeth Livingstoninsethl.hashnode.dev·Jul 14, 2019Do you miss the simple days of Django templates?Single page applications (SPAs) swept us all up in a hurricane. If you're like me, you've dabbled in or are currently using frameworks like React, Angular, or one of the thousands of variations. And, if you're like me, you're wondering if all of the ...01C
SLSeth Livingstoninsethl.hashnode.dev·Jun 28, 2019Django defaults are better than auto_now and auto_now_addSetting auto_now and auto_now_add to True will automatically set a DateField or a DateTimeField to the current date and time. This works great for "created" and "modified" fields. However, suppose you're importing content from another system, and you...01M