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
Python

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
code

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 logo

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