Django community: RSS
This page, updated regularly, aggregates Community blog posts from the Django community.
-
Typography: Rhythm & Proportion
Horizontal motion Bringhurst: Anything from 45 to 75 characters is widely regarded as a satisfactory length of line for a single-column page […] The 66-character line […] is widely regarded as ideal (25). Sabon at 16px has an alphabet length of 203 pixels, or approximately 152 points. To figure out the horizontal measure, I started with Bringhurst’s copyfitting table (29), which suggests a line length of 26-28 picas (around 450 pixels) for an optimal 66-character line. -
Minimalism
I’ve been working on redoing my website for at least the last year or so… and finally got it done. I drew obvious inspiration from the minimalism trend (c.f. Bennett, Tomayko, Pilgrim); the simplicity of those sites are quite refreshing. As I was putting the finishing touches on the site, I ran across a roundup of minimalist designs that I think does a great job summing up my attraction to minimalist designs, the article’s first three points describe perfectly what I’m trying to do here: -
Django Sitemap Framework
Django Sitemap Framework -
Release: django-treebeard 1.0
django-treebeard 1.0 has been released. Direct link: django-treebeard-1.1.tar.gz (don’t forget to read the UPDATING file). I will be focusing now in another project: django-taggable, so stay tuned. Share and enjoy. -
Схема файлового бэкенда Джанго
По долгу службы ковырялся тут внутри у Джанго вокруг работы с файлами. Всякие хранилища, файловые поля, дескрипторы, врапперы... Признаться, штука вышла далеко не простая ("а я еще во-о-от такой помню..."). Я начал набрасывать себе схему того, как объекты друг с другом взаимодействуют, а потом решил ее причесать и выложить, чтобы ... -
Emacs: Dired Directory Management
Picking back up on the Emacs series I started earlier this month I would like to take some time to discuss the Dired mode for directory management. I've used ECB in the past and found it nice, feature rich but in my opinion it had too much information and was in my way, not to mention it drastically increases emacs load time. So I removed it from my configs and now only use Dired. Once you get used to it it really is very powerful. -
Misconceptions about testing (and what we should do about them)
This post is a reply to Eric Holscher’s call for suggestions to extend and improve the documentation about testing in Django. By no means am I an expert in testing, but I thought I would share some thoughts I’ve had about this. It is more like a dump of ideas that come from my own experience, and hopefully that will contribute slightly to the debate. The existing documentation is already pretty good but it is still a bit scarce. It is true that there is a gap in this area and that testing doesn’t get the level of attention it deserves (I’m talking, broadly, in the Django community). Developers who regularly write tests already know how good testing is; but there should be more education provided to newcomers so that testing becomes a more common practice. And this would, in turn, benefit the community as a whole. By the way, Eric should be thanked for leading the way in this quest. If you haven’t yet, you should definitely check out the great screencasts and tutorials he’s posted on his blog about this topic. Personally, I didn’t know anything about testing until I discovered Django and started trying to write patches … -
Writing custom management commands
The other night in the #django-dev IRC channel, Russ, Eric and I were talking about custom management commands for certain types of common but tedious tasks; Eric was discussing the possibility of a command for automatically generating a tests module in a Django application, since he’s our resident unit-testing freak, and I started toying with the idea of one to generate basic admin declarations for the models in an application. So I sat down ... Read full entry and comments -
REST worst practices
A few weeks ago, I sent the following in a email to a co-worker asking for input on designing REST APIs in Django. Since then, I’ve quoted myself a few times; I thought these thoughts would be worth a (slightly edited) public home. I think the best way to dive in terms of mistakes to avoid. If you poke around you’ll find a couple-three different stabs at writing a generic REST API module for Django. -
Extpaste source code now public
Finally got around to creating a repository for the source code of ExtPaste a ExtJS [1] / Django [2] powered pastebin [3]. People where asking me about the source code for http://extpaste.com on the ExtJS forums for some time now. So here it is: http://hg.trbs.net/extpaste/ The project was development and currently runs on a Django version before 1.0 :( But i'm working at this moment to get the repository up to date with Django 1.0. I've already ported it to NewForms-Admin so the biggest thing left is to port to newforms. If everything goes fine the code in the repository should be on Django 1.0 before the end of the day. Updated 15-Nov-2008: Extpaste now runs on Django 1.0 and higher [1]ExtJS JavaScript Framework: http://www.extjs.com [2]Django Web Framework: http://www.djangoproject.com [3]Modeled closely to the excellent dpaste Django pastebin: http://dpaste.com -
This Week in Django
This week, I was a guest on This Week in Django, a great podcast that tracks the weekly activities of the Django community. The audio has just been posted and made available through iTunes. I had a great time doing the show, shooting the breeze about my history and contributions to Django, my plans for the future. It ran fairly long - 2 hours in the recording, 1:40 after editing - but I'm happy with the result. We covered a lot of ground, and after listening to the recording I'm not completely embarrassed by anything I said (although I really do need to get a better microphone and a less noisy chair). As an added bonus, Michael spliced in a piece of post-interview discussion where I give a pretty good clue as to the origin of the numbers in my handle. In related news, I now have the honor of being the first guest on the show to give TWiD an explicit tag. -
Django PDF Concatenation
On the heels of PDF Generation with Pisa in Django I've had the need to pull from a library of pdfs and concatenate based on user selection. At first there seemed to be no good solutions but research and a recommendation by James Tauber (thanks James) turned up pdftk (the pdf toolkit). -
Added kcachegrind support to runprofileserver
Today i've added a new option to Django-Extension's runprofileserver to make like a bit easier for people who want to use KCacheGrind to profile Django. This was sparked by profiling one of the scientific Python scripts i wrote for my research project. I wanted to see where (or at least if) i could squeeze a bit more performance out of it without resorting to ctypes/c-modules or weave. For more information about the latter see: http://www.scipy.org/PerformancePython So i disabled Psyco [1] which confuses the profiler and started my program with the cProfiler enabled and started analyzing it's output. you can do this easily by executing: $ python -m cProfiler ./my_application.py From earlier encounters with profiling i found that KCacheGrind is a really awesome application for viewing and analyzing profile data. However Python's profiler module cannot directly save it's data in a format which is compatible with KCacheGrind. There are a few ways around this and one of them is a script called: lsprofcalltree.py [2]. It converts the profile information from cProfiler to something which is readable by KCacheGrind. Best of all you can use it as an in-place replacement for the Python interpreter so it's just as easy to use as … -
Activities gallery
While developing my recently released activity mercurial extension (and here too), I did a lot of tests on some quite famous/big projects. I’ve found the results to be quite interesting and decided to put up this gallery. Are you interested in the history of commits for kde, linux, django, portage(software), and others? warning : this […] -
A Django Development Environment with zc.buildout
This article will show you how to create a repeatable Django development environment from scratch using zc.buildout. -
A Django Development Environment with zc.buildout
Setting up environments is a pain. Whether it's Django, Zope, ASP.NET, whatever - a typical web stack has often dozens of components with dependencies on each other and underlying libraries. How do you manage this? How do you make sure that the software you're running on your development environment is configured the same way, and is the same version that gets into your production environment? How do you make sure that the third-party Python library you've just started using is correctly deployed? One answer is zc.buildout. Buildout is a tool for reliably creating reproducible software builds. It was originally developed by Zope Corporation, and is often used in Zope builds; however, there's no dependency on Zope. You can use it to build pretty much anything. And I'm going to show you how to get a Django build up and running using it. I shall use PostgreSQL as the database in my examples, but there's nothing stopping you using MySQL or any other Django-supported database, if you wish. You'll also need the standard development tools (gcc, etc.) available since we're going to be getting buildout to compile some binary eggs for us. The Basics: Python and PostgreSQL The only thing you … -
A Django Development Environment with zc.buildout
Setting up environments is a pain. Whether it's Django, Zope, ASP.NET, whatever - a typical web stack has often dozens of components with dependencies on each other and underlying libraries. How do you manage this? How do you make sure that the software you're running on your development environment is configured the same way, and is the same version that gets into your production environment? How do you make sure that the third-party Python library you've just started using is correctly deployed? One answer is zc.buildout. Buildout is a tool for reliably creating reproducible software builds. It was originally developed by Zope Corporation, and is often used in Zope builds; however, there's no dependency on Zope. You can use it to build pretty much anything. And I'm going to show you how to get a Django build up and running using it. I shall use PostgreSQL as the database in my examples, but there's nothing stopping you using MySQL or any other Django-supported database, if you wish. You'll also need the standard development tools (gcc, etc.) available since we're going to be getting buildout to compile some binary eggs for us. The Basics: Python and PostgreSQL The only thing you … -
A Django Development Environment with zc.buildout
Setting up environments is a pain. Whether it's Django, Zope, ASP.NET, whatever - a typical web stack has often dozens of components with dependencies on each other and underlying libraries. How do you manage this? How do you make sure that the software you're running on your development environment is configured the same way, and is the same version that gets into your production environment? How do you make sure that the third-party Python library you've just started using is correctly deployed? One answer is zc.buildout. Buildout is a tool for reliably creating reproducible software builds. It was originally developed by Zope Corporation, and is often used in Zope builds; however, there's no dependency on Zope. You can use it to build pretty much anything. And I'm going to show you how to get a Django build up and running using it. I shall use PostgreSQL as the database in my examples, but there's nothing stopping you using MySQL or any other Django-supported database, if you wish. You'll also need the standard development tools (gcc, etc.) available since we're going to be getting buildout to compile some binary eggs for us. The Basics: Python and PostgreSQL The only thing you … -
PDF generation with PISA in Django
Today I had to come up with pdf generation for a project and was happy to find Pisa makes this cake-work. Pisa depends on Reportlab but you don't have to dig into Reportlab to get your pdf generated. -
Release: django-treebeard
django-treebeard is a library that implements efficient tree implementations for the Django Web Framework 1.0+. It includes 3 different tree implementations: Adjacency List, Materialized Path and Nested Sets. Each one has it’s own strength and weaknesses (see Benchmarks) but share the same API, so it’s easy to switch between implementations. django-treebeard uses Django Model Inheritance [...] -
How to explore dynamically your django code
I have been using the methods presented by Simon Willison on this post.For quite sometimes now and I always felt that it would be nice to have the tab completion when using the debugger inside my views or elsewhere in my django code.Here it is the magical line:import ipdb; ipdb.set_trace()Note : That "pdb" as been replace by "ipdb" which is the IPython debugger.You then get all the nice stuff from IPython (tab completion, nice tracebacks) right in pdb. In order to install it you can for example do : easy_python ipdb -
Django admin inline forms
Django admin inline forms -
Exploring Pinax Series
Pinax is an integrated collection of selected Django reusable applications. It can be used as a head start for website projects and also to experiment patterns of Django applications. As I learn how to leverage Pinax to build Web applications, I’m writing about my experiences. I plan to update this article and to use it [...] -
Exploring Pinax – Part 7
I’m proceeding in my quest to learn how to create a Django application using Pinax as a base. I’m writing a sample paste bin application called Oxybeles. It’s main feature will be the ability to send pasted items to another user and to receive new pasted items as responses. I want a user to be [...] -
Sandboxing Django Reusable Apps
A couple days ago Brian Rosner posted a great article on Reusable App Conventions. If you haven't read it yet it's worth a read or two. I have a few in the works and want to quickly discuss sandboxing your development process for reusables using Pinax.