Today I’m going to talk (rant) about runserver, a great inclusion of the Django software package. It’s designed to help you easily run a Django project in a local (development) environment. Well, like many people, I have Rails in my background, and I miss certain things from it. One of those things, is the shiny [...]
Posts Filed in "Code"
Today (for many hours) I sat here attempting to debug an error which Django wasn’t spitting out. This happened when combining Django+mod_wsgi and having a runtime import error. The result is a generic white internal server error page from Apache, and nothing recorded in any kind of error log.
So, to make your life easier, I [...]
And then want to take a chainsaw to their operations center..
My girlfriend and I started playing World of Warcraft so I figured I’d just reactivate my old account. Went to login and got an “account permanently banned” notice. Well, sure, I did odd things Blizzard didn’t like back in the day, but it wasn’t banned [...]
One of the many issues which one must overcome with Jinja2 is using it with 3rd party modules. A lot of these already have built-in views, and many have yet to realize the benefit of class-based views. Today, I’m going to explain how we approached this for DjangoSpot (GitHub) and django-registration.
The goal, as always, is [...]
As an advocate of Jinja2 I figured it was about time I got on board the train. Up until now I had been using Jinja1 at work, and in most projects. The main reasoning behind this was there was no good connector. Now many might say that you don’t need a connector, you can just [...]
Today I’m going to talk a little bit about one of our hurdles, and a quick solution we came up with to get around it at iBegin. We needed the ability to override URLs per-site, which by itself is fairly easy. You simply change the ROOT_URLCONF in your local or per-site settings file. Let’s take [...]
2
Jul
Pagination in Django
One of the common things we do across projects is paginate querysets and lists. Django happens to provide a base Paginator for us, but it’s usefulness is limited. It requires you to do the same repetitive tasks over and over. We’re one of those groups of people who believe that not every URL need’s to [...]
One issue we had come up over at iBegin lately, is the fact that GZipMiddleware tries to encode ALL responses (with a few minor exceptions). In our cases, we sometimes stream actual binary files over the response. Doing this with the standard middleware causes a unicode error as it’s trying to encode all of the [...]
Most of our projects lately are now using JSON data storage in the database. This makes it very efficient for storing additional data without having to run alters are gigantic data sets. It also allows us to store different data for different kinds of sets within the same table.
Doing this in Django we originally created [...]
For a while now I’ve been wanting to rewrite Lifestream into a contained OO pattern. It seems to be the “best practice” when it comes to WordPress, but tutorials and what are not spread out so it took a bit of time.
During the process, I also took the opportunity to speed up certain areas, such [...]
