Python

2017


cover-5-ways-deploy-your-python-web-app-2017-pycon-2017-must-see-talks-46.png

5 Ways to Deploy Your Python Web App in 2017 (PyCon 2017 Must-See Talk 4/6)

Erin Mullaney

Part four of six in the 2017 edition of our annual PyCon Must-See Series, highlighting the talks our staff especially loved at PyCon. While there were many great talks, this is our team’s shortlist.

cover-python-instagram.png

Python at Instagram (PyCon 2017 Must-See Talk 2/6)

Charlotte Mays

Part two of six in the 2017 edition of our annual PyCon Must-See Series, highlighting the talks our staff especially loved at PyCon. While there were many great talks, this is our team’s shortlist.

cover-decorators-unwrapped-how-do-they-work-pycon-2017-must-see-talk-16.jpg

Decorators, Unwrapped: How Do They Work? (PyCon 2017 Must-See Talk 1/6)

Erin Mullaney

Part one of six in the 2017 edition of our annual PyCon Must-See Series, highlighting the talks our staff especially loved at PyCon. While there were many great talks, this is our team’s shortlist.

Subtests are the Best

Dmitriy Chukhin

Subtests are the best

Testing our code is important. Because developers write bugs, it’s valuable to catch and correct them before the code gets to production so our apps work as they should. Specifically, we want tests that are DRY (Don’t Repeat Yourself), thorough, and readable. Though there are many ways to try to accomplish these goals, subtests make each of them easier. If you’re not using subtests in your test classes, you probably should be.

cover-pycon-2017-recap.jpg

PyCon 2017 Recap

Whitney Hill

Caktus attended PyCon 2017 in Portland from May 18-21. It was the first PyCon for some, while others were PyCon veterans. All of us were looking forward to the opportunity to hear some great talks and make or renew connections in the Python community.

cover-shipit-day-recap-q2-2017.jpg

ShipIt Day Recap Q2 2017

Whitney Hill

Once per quarter, Caktus employees have the opportunity to take a day away from client work to focus on learning or refreshing skills, testing out ideas, or working on open source contributions. The Q2 2017 ShipIt Day work included building apps, updating open source projects, trying out new tools, and more. Keep reading for the details.

Building a Custom Block Template Tag

Dan Poirier

Building custom tags for Django templates has gotten much easier over the years, with decorators provided that do most of the work when building common, simple kinds of tags.

Digging Into Django QuerySets

Jeff Bradberry

Digging Into Django QuerySets

Object-relational mappers (or ORMs for short), such as the one that comes built-in with Django, make it easy for even new developers to become productive without needing to have a large body of knowledge about how to make use of relational databases. They abstract away the details of database access, replacing tables with declarative model classes and queries with chains of method calls. Since this is all done in standard Python developers can build on top of it further, adding instance methods to a model to wrap reusable pieces of logic. However, the abstraction provided by ORMs is not perfect. There are pitfalls lurking for unwary developers, such as the N + 1 problem. On the bright side, it is not difficult to explore and gain a better understanding of Django's ORM. Taking the time and effort to do so will help you become a better Django developer.

cover-come-visit-us-pycon-2017.jpg

Come Visit Us at PyCon 2017

Whitney Hill

PyCon 2017 is fast approaching, and we’re excited to support the event this year as sponsors once again. It’s a great opportunity to meet new friends, exchange ideas and interact with the community at large.

cover-production-ready-dockerfile-your-python-django-app.png

Here's a Production-Ready Dockerfile for Your Python/Django App

Update (October 29, 2019): I updated this post with more recent Django and Postgres versions, to use Python and pip directly in the container (instead of in a separate virtual environment, which was unnecessary), and switched to a non-root user via Docker instead of uWSGI.