Django community: Community blog posts RSS
This page, updated regularly, aggregates Community blog posts from the Django community.
-
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. -
Emacs Terminal Emulator
In Distraction Free Progamming with Emacs I mentioned the ability to have a shell or terminal running in a window within your workspace. This is extremely handy to run tests in Python Shell or to see when something is going wrong with your code. The emacs wiki is a great source of information but I'll give you a quick rundown on how to get up and running quickly. -
Eclipse PDT 2.0 Stable Release
Finally it is there! The first stable release of the PDT plugin for Eclipse Ganymede (at least the first I see). Following the project plan the M1 release should have been there yesterday - maybe they meant the stable release. I'm hoping my anticipation will not be tainted as was unable to check it out for myself till now. -
Eclipse PDT 2.0 Stable Release
Finally it is there! The first stable release of the PDT plugin for Eclipse Ganymede (at least the first I see). Following the project plan the M1 release should have been there yesterday - maybe they meant the stable release. I'm hoping my anticipation will not be tainted as was unable to check it out for myself till now. -
Eclipse PDT 2.0 Stable Release
Finally it is there! The first stable release of the PDT plugin for Eclipse Ganymede (at least the first I see). Following the project plan the M1 release should have been there yesterday - maybe they meant the stable release. I'm hoping my anticipation will not be tainted as was unable to check it out for myself till now. -
Shifting Bits: Twitter Integration Added
I just added integration to Twitter so that when making a blog post active in Shifting Bits a post is sent to the Twitter account configured in the settings.py file. As part of the post to Twitter, the url for the post is passed through urlzen to shorten the link so everything is nice an tidy. This post will serve as it's first public test (so hopefully it works!). -
Shifting Bits: Twitter Integration Added
I just added integration to Twitter so that when making a blog post active in Shifting Bits a post is sent to the Twitter account configured in the settings.py file. As part of the post to Twitter, the url for the post is passed through urlzen to shorten the link so everything is nice an tidy. This post will serve as it's first public test (so hopefully it works!). -
Why you should try Django : Agility
Disclaimer: I'm not naive enough to think that Django is for everybody and that's why the title reads 'try' and not 'use'. However, I do think after giving Django a chance and breaking out of your cycle you will be impressed. I also realize due to where I'm aggregated I'm preaching too many of the converted. However, perhaps if nothing else this will help your arguments when persuading others or your work to give Django a go. I'm also going to assume you know nothing about Django or even much about programming. Finally, I write this as I am getting more and more frustrated with having to work in other environments. Clients often don't know what they want, I think this is a sore spot shared by many web developers. Companies often know they 'want' and 'need' a website but usually they don't know why, what they need or what they can even do. This can make the development process a bit rocky. I've found that often clients start to get a better idea of what they want/need as the development progresses. This is exactly why dynamic, agile development is so beneficial. So let's set the scenes with a very … -
Symfony Latin - UTF-8 problem
I'm currently getting into the Symfony framework and I can definitly say that I like it. But as my site was finished after only some hours I had a problem concerning the display of special characters like the umlauts (ä, ö, ü) aso. I don't use a database created by SF/Propel but use an existing one with latin1_* encoding (the default TYPO3 db encoding). Unfortunatly all umlauts where displayed as questionmark so I started finding an solution. The characters are fuzzy because they were not correctly returned by propel. I tried all configuration directives I found (setting the encoding of the connection to utf-8 aso) but nothing worked. Finally I found a snippet that fixes the problem for me: Setting UTF-8 for Propel with MySQL tables and now everything is just fine! -
Symfony Latin - UTF-8 problem
I'm currently getting into the Symfony framework and I can definitly say that I like it. But as my site was finished after only some hours I had a problem concerning the display of special characters like the umlauts (ä, ö, ü) aso. I don't use a database created by SF/Propel but use an existing one with latin1_* encoding (the default TYPO3 db encoding). Unfortunatly all umlauts where displayed as questionmark so I started finding an solution. The characters are fuzzy because they were not correctly returned by propel. I tried all configuration directives I found (setting the encoding of the connection to utf-8 aso) but nothing worked. Finally I found a snippet that fixes the problem for me: Setting UTF-8 for Propel with MySQL tables and now everything is just fine! -
Symfony Latin - UTF-8 problem
I'm currently getting into the Symfony framework and I can definitly say that I like it. But as my site was finished after only some hours I had a problem concerning the display of special characters like the umlauts (ä, ö, ü) aso. I don't use a database created by SF/Propel but use an existing one with latin1_* encoding (the default TYPO3 db encoding). Unfortunatly all umlauts where displayed as questionmark so I started finding an solution. The characters are fuzzy because they were not correctly returned by propel. I tried all configuration directives I found (setting the encoding of the connection to utf-8 aso) but nothing worked. Finally I found a snippet that fixes the problem for me: Setting UTF-8 for Propel with MySQL tables and now everything is just fine! -
Lightbox Clones Matrix
As I'm currently validating different lightbox clones I'll advert to the brilliant The Lightbox Clones Matrix of PlanetOzh. It lists nearly all lightbox clones and gives the possibility to filter by features and used javascript framework. File size is displayed, too. The Lightbox Clones Matrix -
Lightbox Clones Matrix
As I'm currently validating different lightbox clones I'll advert to the brilliant The Lightbox Clones Matrix of PlanetOzh. It lists nearly all lightbox clones and gives the possibility to filter by features and used javascript framework. File size is displayed, too. The Lightbox Clones Matrix