Archive for the ‘django’ Category

11Aug

Adding ReCaptcha to Django

Posted by Elf Sternberg as django, python, web development

I learned today how to enable ReCaptcha for Django. It’s fairly trivial. I’ll show you how to enable this for account registration. First, go and create a key pair for your site. You don’t even have to give them an email address, which is nice. Install the recaptcha client library on your site: pip install [...]

It’s funny what a day’s wrestling with a hard problem can lead to as inspiration. I’m going to start with a piece of Django code that someone else wrote: Django Activity Stream, a simple piece of code that lets you track “everything” the actors in your system do: every bookmark made, every comment made, every [...]

15Jul

Adding Opensearch to Django

Posted by Elf Sternberg as django, web development

Inspired by Five Web Files That Will Improve Your Website, I decided this morning to implement OpenSearch on the Indieflix Website. (It’s not up yet, we’re still beta’ing it, and it’s along with a massive list of changes that still need testing, so don’t go looking for it.) OpenSearch is a way to turn your [...]

As I’ve been working on a project at Indieflix, I’ve been evaluating other people’s code, including drop-ins, and for the past couple of days a pattern has emerged that, at first, bugged the hell out of me. Django has these lovely things called context processors– they allow you to attach specific elements of code to [...]

24Mar

Loading a dev database in Django and MySQL

Posted by Elf Sternberg as django

We all know the drill with MySQL and Django.  You have a dev database, probably compressed, and you need to roll it out so your server’s in a “pristine” state before you start running migrations and adding stuff.  And the routine typically looks something like this: gzip -dc dev_database.gz | mysql -u djanguser -p djangodb. [...]

So, I got tired of the way Django-SocialAuth was borked and not working for me, so I forked the project and have put up my own copy at GitHub. There are three things I noticed about the project right away: First, it forces you to use a broken templating scheme. I haven’t fixed that, but [...]

For the past few days, this has been bugging the Hell out of me and I finally decided today to knuckle down and figure out how the hell Python decorators-with-arguments work. Basic Decoration The basics: A python function takes arguments, performs a task, and returns a value. A decorator takes as its argument a function, [...]

This is part 3 of a series. In part 1 we set up a Hudson test server, and in part 2 I introduced a simple Django application with some simple tests. Now we’re going to make Hudson run those simple tests. Prerequisites: Your box for running this application must be able to run both Hudson [...]

This is Part 2 of a series. Before I demonstrate how to do continual integration testing, I need a demonstration application. I’ve chosen a simple Django application, your basic echo program, with no styling or media at all. This ought to be more than enough to demonstrate base functionality. A New Django Project Start by [...]

Eddie Sullivan at Chickenwing Software has a fascinating post entitled The Facebook Platform is Dead. I agree with many of his comments. I don’t think there’s anything terrible about the “Facebook Certified Application” program; that’s a business decision, not a software policy decision. But Sullivan says one thing that set me off. He wrote: The [...]


Recent Comments