Posts with tag “django”

RSS feed for tag “django”

Sending emails with embedded images in Django

Django offers useful classes to easily send email. It is also easy to add attachments to emails. I did have to puzzle a bit to get embedded images working. This article describes the way I do it now. I will first describe the most important elements and then I will show a more complete example.

Migrating django.contrib.comments to Disqus

As of today I am using Disqus for comments on this site. This meant that I had to migrate the old comments (which used django.contrib.comments) to Disqus. Here’s a short description of how I did this.

Whiskers and buildout.sendpickedversions

Last year I participated in a deployment knowledge sharing session and I started implementing changes at my company pretty soon after. The result is that we are using Puppet for some parts of our server configuration. We also added Munin to our monitoring toolset (and I used Puppet to deploy Munin and manage its configuration). But an important piece that was still missing in our setup was an overview of which packages we use in the buildouts of our clients and more specifically which version each client uses.

Using a jQuery plugin in Django admin and getting a “$().foo is not a function” or “Object ... has no method foo” error?

Are you using a jQuery plugin, for instance jQuery UI, to spice up the Django admin site? Then you might get either an error like “foo is not a function” (Firebug) or “Object ... has no method foo” (Chrome Developer Tools). Are you confused because foo should be defined in the plugin? Don’t worry, the solution is simple.

Searching in a Django site — part 1: what and why

One of the things that was still on my wish list for this site, was a proper search. In two articles I will explain how I’ve done this. The next article will describe the way I have currently set things up. This article will primarily focus on the journey I made to come to my choice (Djapian).

Google Webmaster Tools

Google’s Webmaster Tools provide the modern webmaster/developer with some nice tools to improve a website and the way the site is indexed. In this article I’ll focus on the crawler related tools. Specifically, how they helped me when I migrated from Plone to Django.

How I solved the comment spam for my Django site

After this website migrated from Plone to Django, the comment spammers found my site more interesting. Instead of five spam comments a year, I suddenly got the same amount per week. Although those comments were never published (more on that later), it did annoy me. By no longer displaying the comment form below the blog entries, the problem of the spam seems to be solved. While this wasn’t my goal, it is a nice side effect.

Dots in a SlugField

When migrating from Plone to Django, I had problems with editing weblog entries with a dot in the url. Apparently Django doesn’t allow dots in a SlugField. Here’s how I solved it.