Wrote up a post on how we use feature switches at Disqus within Django templates and views. (In the future we’ll be posting all of our tech over on the Dev section of the Disqus blog)
Posts Filed in "Django"
As many you of know I joined Disqus last month. This was a pretty big move for me, and definitely a great one. They have some amazing challenges, and the company has a great group of people willing to solve them. I’ve always been a big advocate of MySQL. Not because it’s the best relational [...]
Today I pushed out a slight overhaul to the UI (and functionality) of django-db-log. The 1.7 version set (use 1.7.1 as 1.7 had a couple minor issues). Here’s the brief changeset: Renders full debugging pages just like you’d see with Django (only for newly logged errors) under the new Messages admin. Supports logging full exceptions [...]
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 [...]
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, [...]
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, [...]
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 [...]
