Tag django

Update Your DjangoSites Screenshots When You Want

I often get asked to update website screenshots over at DjangoSites because somebody has re-designed their website, or the screenshot showed a cross-browser bug in their code. I'm now pleased to announce that screenshots can be renewed on-demand by website owners! Read on for more information.

Django Site of the Week: The A.V. Club

It's been a while, but the Django Site of the Week is back. This week I spoke to Tom Tobin, developer at satire news site The Onion, about their Django-powered site The A.V. Club. Originally a Drupal website, Tom and his team converted the site to Django over a period odds three months. So how do they handle a million unique views a month? Read the article to find out.

The Django Deployment Survey: How Are You Hosting Django Websites?

What's the most popular method of deploying Django powered websites? Recently, the officially sanctioned method was selected to be mod_wsgi with Apache. However, there are Django powered websites out there that are using a plethora of other methods to put websites in front of viewers.

A change for DjangoSites has just been made public that will allow website submitters to volunteer their deployment details, so that over time detailed statistics can be gathered. If your website is listed at DjangoSites, you can click the 'Edit' link right away to let us know what you're using. If you aren't yet listed, the submission form also lets you provide those details.

The results will not be shown alongside your DjangoSites listing. Instead, once there are more than a handful of responses I will publish aggregated figures for public consumption. Read on for a little more information!

Django Site of the Week: Deskography

Seeing how other people work is something that seems to be of interest to most developers. Whether it's because they want to become better workers themselves or because they're somewhat voyeuristic is open to debate - either way, Django-powered website Deskography is a well-designed social desk-sharing website. This week, I spoke to Gustaf Sjöberg of Distrop to find out why they chose Django to power Deskography, and what it's allowed them to do. You can read the interview over at the Django Site of the Week.

Full-text searching in Django with PostgreSQL and tsearch2

Recently, I have wanted to improve the searching ability in a number of my Django projects. I've often added a search box that simply does an icontains filter, which works fine for small sites but doesn't scale due to the inefficiency of matching text with basic SQL queries. The plus side of an icontains filter is that it works on all of Django's database backends (with the exception of SQLite, which works but in a case-sensitive way), so it can be useful for pluggable applications to implement. I wanted something that could do some heavier lifting, so I looked into tsearch2 - a PostgreSQL plugin that provides full-text indexing and searching that's twice as fast as standard icontains filters. On DjangoSites I managed to reduce my search queries to half their original time, with improved accuracy. Read the full article to find out how.

Django Site of the Week: ForecastWatch

Eric Floehr is the man behind ForecastWatch and ForecastAdvisor, two Django-powered weather websites that aggregate and analyse weather forecasts to compare their accuracy on an ongoing basis. This week, I spoke to Eric about the history behind his sites, how he handles massive data sets, and his conversion from Ruby on Rails to Django. You can read all about it over at the Django Site of the Week.

Django Site of the Week: ShutterCal

ShutterCal is a photo sharing site with a difference - it encourages contributors to upload one photo every day to help people reach a goal: whether that may be to improve their photography, watch themselves evolve over a year, or remember people and places they visit. ShutterCal started in 2007, and this week I spoke to developer Dan Ferrante to find out why he chose Django, some of the challenges he's faced, and how he uses Django and other open-source software to make his life easier. You can read more over at the Django Site of the Week.

Django SOTW Moving to Mondays

To better fit with both my own way of doing things and with general web browsing patterns of the Django SOTW public, I'm moving the SOTW to Mondays rather than Saturdays. Also, I've finally succumbed to the forces and I've joined Twitter so you if that's your kinda thing then come and say hi!

Django Site of the Week: Represent

Represent is a new website prototype from the New York Times that provides New York residents with information about the whereabouts of their elected representatives. What's interesting about this website is that it's one of the first large-scale sites to implement GeoDjango for spatially-aware applications. This week, I spoke with Derek Willis to get some details on their implementation of a Django project at one of the worlds' most famous newspapers. You can read the entire interview over at the Django site of the Week website.

Django Site of the Week: EveryBlock

The Django Site of the Week is back after a Christmas-induced break with an interview with Adrian Holovaty. Adrian is no stranger to Django, and his name is known throughout the community as one of the brains behind Django's birth and subsequent open-source release. His latest project EveryBlock is the evolution of an earlier mashup, chicagocrime.org, which won Adrian a number of awards. So what are the driving forces behind EveryBlock? I recently spoke with Adrian to find out.

Django Site of the Week: Ooh-Ga-Boo-Ga

The second Django Site of the Week is online. This week it's Satchmo website extraordinaire Ooh-Ga-Boo-Gah.

Dynamic ModelForms in Django

Since 'newforms' became the norm within Django, there seems to have been some confusion relating to dynamic forms that relate specifically to a model.

The basic way to handle forms is to use a ModelForm for simple single-model-related forms, and Form instances for everything else, including more advanced Model-based forms. Many people seem to forget, however, that a ModelForm or Form instance can be manipulated after it's created.

In this blog post, I have included a design pattern I've recently used that should be of use to others who want to tweak their ModelForm instances at runtime.

Django Site of the Week

Since I started DjangoSites over a year ago, the response has been fantastic. I used to approve a handful of websites a week, recently it's more like a half-dozen a day.

I've decided that a bunch of those websites are just awesome, and I wanted to have a chat with the owners of those sites and share their stories with the Django Community. Without further ado, I would like to introduce the Django Site of the Week. The first featured website is Disqus, and an article has been published at the SOTW website based on my interview with Daniel Ha, one of the founders.

Django Site of the Week: Suggestions Wanted

Over at DjangoSites there is a steady flow of new websites, with a handful showing up every single day. Something really cool is that a growing number of these are either commercial websites that are using Django to make money, or they are very serious in terms of code-base, development effort and online exposure. Django is growing up, and is making an impression on the web at large: I've decided to interview the brains behind these websites to find out why they chose Django, how it assisted their development processes, and how it got in their way. Soon I'll be launching Django Site of the Week, and I want your input.

Jutda Helpdesk - A Django-Powered Ticket Tracker for Small Enterprise

To manage support requests for WhisperGifts I started building a ticket-tracker application in Django. It's evolved into a fully-fledged system that allows your customers to easily submit tickets and help you provide timely replies. A few months back I published the code to Google Code and open-sourced it - so you too can now use it in your small Django-powered business.

How I Moved My Commercial Projects to Newforms-Admin

Django 1.0 Alpha is out, and with it come some major API changes to Django's internals. This means you need to make a number of changes to your Django projects before upgrading Django to a recent copy. I've got a handful of commercial and public-facing websites running on Django, so I decided now is a good time to upgrade them.

DjangoSites is 1337

Since I missed the 1000-site milestone, here's the next best thing. We've got 1337 sites listed on DjangoSites!

DjangoSites Gets New Shoes

After almost twelve months online and well over a thousand sites submitted, DjangoSites has had a facelift and moved to a new hosting home.

DjangoSites Gets OpenID Support

One of the coolest things to happen to the Internet in the past few years is OpenID, the decentralised system that allows you to use a single 'login' mechanism across multiple websites. OpenID support in Django is coming of age, and I've just implemented it at DjangoSites.

Weblog Updates

Apologies for the recent RSS spam, where all of my posts were re-published. The reason was a new blog system I'm using, syndicating my actions around the web into a single 'tumblog' style feed.

WhisperGifts Sees the Light of Day

I've been blogging here about bridal gift registries for well over a year now. All of that talk has resulted in the creation of WhisperGifts, a Django-powered service that allows couples to host their bridal gift registry online with minimal fuss and maximum benefit for everybody: The couple getting married AND their guests. Read on for some benefits of the service.

Jutda: Django-powered Solution Provider

In my previous post I mentioned Jutda, a Django-powered company that I'm working on in my spare time. I would now like to formally introduce Jutda to the Django community and outline a few exciting projects that are on their way. World, meet Jutda!w

Overdue Catchup

A quick update on a few projects including DjangoSites, WhisperGifts, Jutda, a Django-powered Forum package, and my OpenID implementation.

Django Menuing System

Although Django's template system is very easy to get the hang of, it's not for everybody. In particular, it's not for people whose job it is to publish content without having any technical know-how. For this reason, I'm giving away a simple menuing application for Django that lets your content editors addand change menu items without bothering your template authors.

Wanted: Engaged Djangonauts

Getting married? I'm looking for people to help with a final round of Beta testing for my Django-powered Bridal Registry service. We've done some extensive testing so far, and now need a few people getting married in the next few months to finalise testing before a public launch.

DjangoPoweredSites Grows Up

I've spent some significant time over the past weekend moving website listings from the old DjangoPoweredSites wiki page to DjangoSites. That brings the total number of Django-driven websites listed to over 800! We'll now close down the wiki page as it has become redundant, but require a little bit of help cleansing the new list.

Easy Multi-Part E-Mails with Django

Django provides an easy way to send multi-part text/HTML messages. I've recently built on top of this existing framework to provide an ultra-easy way to send templated HTML and plain-text messages with minimal code duplication.

Django: Multiple Aliases for a Single Website

In these days of cheap domains, it's often desirable to own multiple domains for a single website. You've probably got each of the .com, .net and .org domain names, along with a country-specific domain. You want each of these to present exactly the same website to the world, but good design says that each web page should have one, and exactly one, URL. So what's the best way to serve this up without having an Apache config for each domain?

Django: A Diverse Community

Scott Barnham, one of the guys behind the recently-launched Django Gigs website, has posted some statistics from visitors to the Gigs website over the past few days. I've put together some similar stats for the Django Sites website, which has been online for a few months now.

Mixing OpenID into Django's authentication system

OpenID is a de-centralised authentication system that is making a splash in a big way. In this post I give an overview of what OpenID is, and how I'm going about integrating it with Django's user-management / authentication system.

Validating a Username via jQuery with Ajax

The phrase 'simplifying the user experience' (or it's cousins) is thrown around regularly these days, without many examples on HOW to actually make life easier for the end user. In my opinion it's about removing needless junk wherever possible, letting the user focus on what's actually important. A simple example I've extracted from a current project is minimising needless page loads. Read on to find out how I validate availability of a username during the Django registration process.

DjangoSites: We Want YOU!

We're at 260 sites listed on DjangoSites. The DjangoPoweredSites page has 3-4 times that number - so if you've got a website built with Django, why not submit it (for free, no less) and show it off to the world?

Djangosites Updates

Djangosites.org was launched last week as a new way to show off the many websites that are built with Django but that don't get much fanfare within the community as they aren't technology based. I've received some fantastic feedback from the community so have improved the RSS feeds and access to info about source-code.

Introducing Djangosites.org

Over the past few weeks I've been working on a website to allow the Django community to showcase what's out there that's built using the fantastic Django framework. With input from others in the community, the site is now live. I introduce to you, DjangoSites.org

Using The WebThumb API with Python

There is a fantastic free service available to create screenshots of websites using an API at bluga.net. The problem is, there are no samples in Python. As part of a project I'm working on with the Django community, I've written a simple Python interface to the bluga.net webthumb API which lets you pass in a URL and receive back a screenshot.

Helping Sort Django's Error Emails

Running multiple Django sites, all with debugging disabled? Getting confused as to which traceback emails belong to which site? This simple Django tip shows how to alter the e-mails being sent by Django so you can more easily work with these e-mails which are a very useful site management tool.

Blog Spam Protection

I've made a small change to my blog to try and slow down the spammers a bit - the first step in a few that I have planned.

The Pareto principle (Or, why the 80/20 rule always bites us in the ass)

There is a common saying that 80% of a project takes 20% of the time and budget - and the remaining 20% of the work takes 80% of the time. This is no more correct than in the software development environment. Warning: Rant ahead!

ChangeManipulators on only part of a model

There is a cool function in Django for managing forms, and automatically doing data validation and manipulation before updating the database. That same cool function also has a critical issue in it that makes it impossible to reliably only update part of a model - except that critical issue has a critical fix that has been around for almost a year now and has never been documented.

Sending E-Mails via Templates

Django's templates are fantastic for displaying content on your website, but what if you could use the power of the template system in other areas, such as e-mails sent from your application for registration or update purposes? Well, you can do just that - read on for an example.

Using Django's TemplateTags

Often times on a website you will want to include the same block of dynamic data in your template, regardless of the view that generated the page. Common examples are lists of tags or categories, navigation bars (built from the database) and other such lists - such as those on the right side of this page. The good news is that you don't have to modify every single view to add these details to the template context. The better news is that it's fantasmically powerful with Django.

A Django Blog: Redux

A recent upgrade to Django has made some drastic and far-reaching changes, called 'Magic Removal'. As such, all earlier code that relies on Django has to be updated - including my blog tutorials. Read on for a summary of the changes you'll have to make.

XSS Vulnerability

Simon Greenhill, a New Zealand based programmer, has alerted me to a cross-site scripting (XSS) vulnerability in the comments portion of my blog - that seems to extend to the comments module in ALL django applications.

Django: Magic-Removal Upgrade

I've updated my websites to run on the latest Django code base, named 'magic removal'. The updated blog code is coming soon, as it has to be altered in many ways to make it work on the new code. This should be the last major base change to Django before their 1.0 release.

Building A Blog with Django #3

The third portion of my series on building a weblog application with Django: learn how to add the global Django comments module to your application, and list all posts for a given tag.

Building a Blog with Django #2

The second part of my 'Building A Blog with Django' series, showing how to actually make your database visible to the world - you'll be putting your weblog online for all to see. See part 1 for information on creating the database.

Building a Blog with Django

The first in a multi-part series on building a weblog using Django. This first article covers getting started, creating your database, and using the automated Django Administration screens to enter data. Stay tuned for more articles including putting your blog online, adding user comments, and more.

Django: My First Impressions

I've always been a PHP coder - everything web-based that I wrote was in PHP. Until last week. I've discovered Django, and I'm wishing I found it earlier. And why haven't I been using Python until now? Read on for my first impressions of the Django web framework.

Getting Started With Django

I've got a new weblog online built using Django, a Python web application framework.