The client wanted to give their users the option of printing completed forms to a pdf file. They also wanted the pdf to be rendered with formatting and style that varied slightly from the online display of the completed form, and so desired a solution other than the browser’s own...
Encrypted Postgres Backups
When creating a Postgres Database backup, one convenient approach is to export the database to disk via the pg_dump command. This postgres export file can then be picked up by a regular filesystem backup. A possible security risk with this approach is that your sensitive database data could be situated...
Quick Introduction to Mock
Quick Introduction to Mock Mock is a powerful library for facilitating testing. It allows users to replace components of your application with powerful mock objects at testing runtime. These objects can then be used to make observations about call patterns and to assert which methods of the object were accessed, the...
Introducing django-nocaptcha-recaptcha
This week, Google announced a radically new way of handling human detection with a revamped reCAPTCHA. This new iteration, called No CAPTCHA reCAPTCHA replaces the hard-to-read distorted text image transcription with a simple checkbox. We've never been big fans of CAPTCHA technology. It transfers the burdeon of proof from the server to...
Got Rot?
A 2014 study released by the Harvard Law Review shows that an alarming number of hyperlinks go bad in a surprisingly short time. Link Rot has been a problem from the very beginning of the web. Over time, websites can come-and-go and redesigns can change the location of content -...
5 million votes and counting at Rockhall.com
The Rock and Roll Hall of Fame recently announced their 2015 nominees. At the same time, they opened up a Fan Voting application so that music fans across the world could make their selections known. Rock Hall approached Imaginary a couple weeks prior and asked if we could design an...
New Django Server Setup: Part 2
In Part 1 of this article, we discussed our choice of typical server stack and the general packages that we find useful upon an initial installation. Part 2 will focus on setting up the site environment and configuring the system services. As mentioned before, at Imaginary, this setup process is normally automated...
New Django Server Setup: Part 1
A core challenge of setting up a Django project is creating a production-worthy server environment and project setup. At Imaginary Landscape, we've put a lot of thought into how to accomplish this task in an intuitive and flexible way. The goal of this article is to detail the default setup...
Django and IPython Notebook
The IPython Notebook is a really cool application, and I've always wanted to use it during Django development and debugging. The only problem is that it requires a lot of dependencies and I feel no need to encumber my production projects with those dependencies for a feature that I only...
Debug Toolbar Primer
The Django Debug Toolbar is a powerful and useful tool for identifying potential trouble spots in your Django application. Hopefully, this post will serve as a starting point for understanding the information presented by the toolbar. Also, we will cover a couple of plugins for the toolbar, cache panel, and...
Twelve-Factor Renaissance
It has been a week since our production team returned from the 2013 DjangoCon US. Though technically we didn't return since it was in Chicago where we are located! Nevertheless, it was, wholeheartedly, an uplifting and enlightening experience. Russell Keith-Magee's keynote really demonstrated just how far the Django Project and its...
DjangoCon Performance Optimization Slides
Below is a PDF of the slides for today's DjangoCon US presentation, "Trial By Fire: Real World Performance Optimization" by Joe Jasinski and Dan Johnson (Tuesday, September 3, 2013 - Track 2). Presentation Slides
The Onion films at the Imaginary office
This week, The Onion arrived at the Imaginary Landscape office to film a short segment for their website, "CEO Has Special Knack For Recognizing Great Ideas and Ruining Them." Featured in the film was Imaginary Landscape's own Jenn Sedik (Tara Callies), Dustin Lacewell (Jason Rutherford) and Joe Jasinski (Tim Williams)....
Simple Job Queues with django_rq
The de facto solution for job queues with background workers is Celery and RabbitMQ, but it is not the right fit for every project. RQ is an alternative to Celery, and while not as featureful, does provide a lightweight solution that makes it easy to set up and use. RQ...
Remember your robots.txt
Because the development site is also on the web, it needs its own web address (e.g. dev.yourcompany.com). There are many adjustments needed in the configuration file to accommodate the development URL, especially when testing third-party connections. For example, ecommerce gateways don't like when credit card information is coming from a...
Upgrades: Django Old to Django New
Sometimes we are faced with the challenge of upgrading old Django-based projects. The task can be daunting, as a lot has happened in Django within the last few years. Since Django 1.1.1, Django has been through 15 micro releases and 4 minor releases. The term "minor" seems deceptive as a...
Django Internationalization
A few weeks ago I gave a talk at the Chicago Djangonauts meeting on Django Internationalization. Apparently this isn't a task that a lot of people need to do frequently, as the crowd was not too familiar with the content of the talk. Luckily, internationalization isn't too complicated a concept and...
Better UI prototyping with a Django twist
As part of our new appreciation for start-up organizations and their love of Django, we thought we’d share how we approach the concept of rapid UI prototyping. Early stage start-up companies often need a proof of concept to help convey the vision of the new business model. Yes, there is...
Rackspace Temporary URLs with django-cumulus
We love Rackspace at Imaginary Landscape. Recently, we needed to store a number of large files securely, and for logistical reasons, we chose to store them via Rackspace’s Cloud Files. Rackspace provides the ability to create temporary URLs for files stored via their service. This allows temporary access to privately...
Testing and Django
At the last Chicago Djangonauts meeting, which we host in our office, I gave my first Python/Django talk. I spoke regarding unit-testing your code in general, but, also how unit-testing works within the context of web-applications. The talk went smoothly and it seemed to be well recieved. Python's standard library...
Two talks accepted by DjangoCon
I'm happy to report that the DjangoCon schedule has been announced and we have two presentations that made the cut. Joe Jasinski will be making the solo presentation, "So You Want to Make a Payment: Comparing and contrasting Django payment options" which will introduce and compare some common payment gateway options,...
Multiple File Uploads in Django
Here is a quick example of how to add a multiple file form to your Django application. Most multiple-upload front-ends were created without Django in mind, so interfacing with tools is not always straightforward as it might be with a different language. Thankfully, there are a couple of Django libraries...
Testing As a Different Django User
All types of Django auth do basically the same thing: They associate a browser session ID with a Django user if the user logs-in successfully. I found a neat technique to bypass a Django login by modifying with a Django session, which can be useful for testing purposes. Why is...
Managing multiple SSH identities
Here at Imaginary we maintain our own git repositories internally with the help of the invaluable utility, Gitolite. This works well for us. However, in some cases, our clients have their own repositories that we must interact with. The problem arises when the client repositories reside on a third-party service, usually Github. As you likely know,...
Where HIPAA and your website collide
As a Web developer with a specialty in creating and maintaining hospital websites, it is important that we fully understand where these things intersect with HIPAA. In fact, any agency that is charged with the creation, care and maintenance of a hospital website must fully understand these things. One of...