Beardy Geek – Web Development Blog

A blog about web development – giving tips and tutorials about all aspects of web dev.


Beardy Geek – Web Development Blog

Archives by category

Monitoring Django with Munin

My friend and fellow Djangonaut Richard Barran, has written an excellent post about how to monitor a Django site using Munin. He’s written a couple of munin pluggins specifically for Django which he explains in the post. Essentially, Munin is a monitoring tool that lets you look at various performance aspects of your server, and is handy […]

FacebookTwitterGoogle+LinkedInRedditStumbleUponShare

February 17, 2011, Django
Python Decorators for Djangonauts

If you’ve used Django for any amount of time then you’ve probably come across decorators.  They’re the things with the @ signs over the top of your view. The first one you’re likely to see is the @login_required decorator, which requires a user to be logged in before the view will run.  If they are […]

FacebookTwitterGoogle+LinkedInRedditStumbleUponShare

September 24, 2010, Django Python Web Development
Django quick tips – using template filters in your views

Django has some very useful template filters, like slugify, which turns a string with spaces into a suitable url slug, and title, which turns any string into title case. Have you ever wanted to use these in your views? All you need to do is add this import: from django.template.defaultfilters import * You can replace […]

FacebookTwitterGoogle+LinkedInRedditStumbleUponShare

September 21, 2010, Django Web Development
Organising your Django code

There are several options when it comes to organising your code in a Django project.  There isn’t a ‘correct’ way, and it will depend on the size of the project, if it is a team development, or purely the preference of the developer. Templates Django gives you the ability to put your templates anywhere, either […]

FacebookTwitterGoogle+LinkedInRedditStumbleUponShare

August 29, 2010, Django Web Development
New Django Site – Blog Twin

I created Blog Twin after reading a blog post by Viper Chill entitled The Secret to growing your blog twice as fast with half the effort, I decided to create a site that would help people find a blogging partner. Blog Twin is written in Django (naturally!).  You register, add details of your blog, and […]

FacebookTwitterGoogle+LinkedInRedditStumbleUponShare

May 9, 2010, Django Web Development
Adding Views to the Django Admin

I recently had to write a view that exported data to csv.  The view had to be contained within the Django admin area, on a separate page from the rest of the apps and models.  Here is the approach I took. The Urls There are 2 ways to add urls to the admin: the quick […]

FacebookTwitterGoogle+LinkedInRedditStumbleUponShare

March 13, 2010, Django
New Django Site – The Great British Sleep Survey

I’ve very recently finished a django based site for a company called Sleepio.  The project was to create a survey site, called the Great British Sleep Survey. Once completed, it calculates your sleep score and creates a report tailored to your issues (or lack of). Also working on the site, doing all the xhtml and […]

FacebookTwitterGoogle+LinkedInRedditStumbleUponShare

March 12, 2010, Django Featured
Django Tips – Unique Date Querysets

I swear this particular feature of querysets was made especially for the archive listing of a blog. You know, the month and year listing in the side bar for all your previous posts. This solves that problem exactly. Let’s say you have a BlogPost model, and a post_date field within said model. You want a […]

FacebookTwitterGoogle+LinkedInRedditStumbleUponShare

February 16, 2009, Django
From WordPress to Django – Part 1

Now don’t get me wrong, there’s nothing wrong with WordPress. It’s just that I like to play with stuff, so I thought it would be fun to create a blog in Django, copy all my WordPress posts across, and add at least some of the functionality that WordPress has built in. Open Source Throughout this […]

FacebookTwitterGoogle+LinkedInRedditStumbleUponShare

January 14, 2009, Django
From WordPress to Django – Part 2

View Part 1 Beardy Geek Git Hub Repository Welcome back. In part 2 I’ll be getting to the meat of the issue, which is retrieving the data from an existing WordPress blog, and feeding the data into my own models. Models I’ve decided to start the models from scratch, rather than trying to copy the […]

FacebookTwitterGoogle+LinkedInRedditStumbleUponShare

January 1, 2009, Django