Archive for the ‘python’ Category

13Oct

Django-Zipdistance

Posted by Elf Sternberg as Design, programming, python

Recently, I had the pleasure of attending another of those Seattle Django meet-ups.  This one was a potpourri event, just people talking about what they knew and how they knew it.   I revealed that I’d written my first aggregator, and that seemed to be an impressive statement.  Apparently Django Aggregators (database conditionals that perform sub-selected summarizing or […]

Hot on the heels of my last entry, the next utility is needed to extend the event object to automatically produce a URL compatible with Google Calendar’s “create an event” handler. Now, I could extend the Event application myself and add a get_google_url() method to the model, but let’s try to do this The Django […]

The Django Event Calendar is a fairly old and well-respected piece of code, useful for a variety of social networking and announcement-oriented applications.  It’s not the be-all of events calendars, but it does what it has to well enough.  I’ve used it on several projects. The ${BOSS} asked me to use it for announcing upcoming […]

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 […]

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 […]

Following up on the The Onion’s announcement that they’re using Django comes this priceless discussion of the technical challenges of doing so with several members of The Onion’s technical team. They were using Drupal before. Among the things I discovered: Grappelli, a customizable theme for the Django admin uWSGI, a high-performance WSGI container separated from […]

03Feb

Rails 3: Django with a funny syntax

Posted by Elf Sternberg as python, ruby

From the announcements for Rails 3: The upcoming version 3 of Ruby on Rails will feature a sexy new querying API from ActiveRecord. Here is an example: User.order(‘users.id DESC’).limit(20).includes(:items) In other words, Rails is now Django. Also: Each application now has it’s own name space, application is started with YourAppName.boot for example, makes interacting with […]

Java is Pass-By-Value, Dammit! Quite possibly the most important article I’ve ever read, because it finally, finally explains to me what Java’s object-passing model is really all about. I’ve never understood it, and now I do: it’s exactly backwards from pass-by-reference, so it’s exactly backwards from the languages with which I grew up. The Object […]

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 […]


Subscribe to Feed

Categories

Calendar

June 2019
M T W T F S S
« May    
 12
3456789
10111213141516
17181920212223
24252627282930