Django community: Community blog posts RSS
This page, updated regularly, aggregates Community blog posts from the Django community.
-
BarCamp Cologne
At the weekend (06/06/09 and 07/06/09) I’ve attended the BarCamp in Cologne. The event was completely overbooked just within some hours after the registration page was opened and I’m glad that I’ve got the possibility to attend there. A hint for people who try to attend to an overbooked event: just go there and ask on site to get in. Normally they don’t say no. On saturday I gave a little session there about the JavaScript Framework Dojo and the server-side web framework Django and how you can use Dojango to combine those two worlds. In the session I’ve showed some basic slides that were followed by a simple coding example. The people, who attended my session, were more interested in Dojo instead of Django, because they already knew a lot of Django. After doing my 30 minutes for the session I had to answer Dojo questions for another half an hour. Next time I definitely will do a Dojo session upfront :-) Dojango View more PDF documents from klipstein. Thanks to the organizers and sponsors for having such a nice event in Cologne. Can’t wait for attending the next BarCamp there. -
djapp.org
Another site listing django plugins -
Django 1.1 Talk at Ottawa Python Authors Group
I will be giving my Django 1.1 talk at The Ottawa Python Authors Group meeting on Tuesday. UPDATE: A video of my talk is now available -
New Django-based Homepage
New Django-based Homepage -
The Trials and Tribulations of Django + Git
I just finished my last exam today - Web Programming and Scripting - which explains the distinct lack of activity around here in recent times. Thankfully I could end my exam season on a high, as web programming is, well, what I do - so it wasn't too much of a challenge! Something strange happens [...] -
Django talk
Just finished my Django talk yesterday and I must say while a few dude and dudettes walked out, there was generally quite good interest (better than I thought) from a few young people in the crowd. Initial talks are also underway to form a PUG or Python User Group locally here in Malaysia. I would really like to see this happen. The response has been quite good infact I would go so far as to push to even include Python in some programming curriculum in our universities.That is the only way I would see Python growing and getting more acceptance. On that note too I also mentioned during my talk for frameworks like ROR, Django, TG and it's like to gain more acceptance in the industry, more articles or howtos concentrating on enterprise level deployments of these frameworks have go to be available.Something like: http://enterprise.djangoproject.com? I would really like to see Django grow from it's current girth to something that could rival all the J2EE stuff out there.Nice link here to some good django slides ... damn could have used those for my talk :).P/S -Thanks to all those readers who came to the talk :) -
Installing Django, Solr, Varnish and Supervisord with Buildout
Here I'll detail my buildout configuration for an install of Django, Solr (http search server, ), Varnish (http cache), and supervisord for controling solr and varnish. I'll show how to get a Debian init script for supervisord (of course instructions are valid for Ubuntu). I'll detail parts of base.cfg for each service, and I'll try to explain what and why.This may not be the best way to do that but at least it works for me(tm), so I think it deserves to be shared.My buildout doesn't handle (yet?!) the apache configuration, so I will not cover this. For the curious here is the intended http chain:Apache listens on port 80 and forwards requests to Varnish on port 3128. Unlike a typical Zope setup I don't need rewrite rules (here), simple proxying is enoughVarnish reaches the backend (django) on port 8000Apache listens on port 8000, and serves Django with wsgi. Hopefully it serves only localhost.django may query solr on port 8983Buildout files organisationIn my buildout directory I have:base.cfg: this file contains the core configuration. Specific settings (for developpement, production...) are made in files that extends base.cfg.templates/: this directory contains file templates used in my buildout, for example I put here the … -
Diapositivas de curso de introducción a Django
Hace tiempo que Ramiro Morales, Alejandro Peralta y John Lenton impartieron un curso de introducción a Django en Argentina. Me he topado con las diapositivas del curso, y, aunque haya pasado bastante tiempo, las enlazo porque siguen siendo útiles para todos aquellos que estén empezando con Django 1.0.x ... -
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. -
Update Your DjangoSites Screenshots When You Want
You can now update your DjangoSites website screenshot by simply editing your listing and ticking the box that says "Re-do Screenshot". To edit a website, first log in to DjangoSites using your username or OpenID. Once logged in, click 'My Sites' in the navigation bar, then click on the website you wish to have updated. From the website detail page, click the 'Edit' link next to your username. Make any changes you wish to make, click the Re-do Screenshot checkbox, and click 'Save'. It's important to note that when you edit a website, it becomes un-verified so it will not be publicly visible. I manually review all submissions and edits, so it might take me a few days to verify and publish your listing after you edit it. This is something that has been on the books for a while, and I'd like to thank Richard Barran for prodding me into getting the change done. While you're editing your listing, you can update your deployment details to help with our Django Deployment Survey. The results will be published shortly for all to see - thank you to those who have responded so far! -
Update Your DjangoSites Screenshots When You Want
You can now update your DjangoSites website screenshot by simply editing your listing and ticking the box that says "Re-do Screenshot". To edit a website, first log in to DjangoSites using your username or OpenID. Once logged in, click 'My Sites' in the navigation bar, then click on the website … -
Class based views
We discussed these at a recent Vancouver Django (May 2009) meetup and it was also a pattern I used on a recent project. -
Зачем нужны сигналы
На днях у меня в форуме возникли почти подряд два топика про сигналы. Оба напомнили мне давно закравшееся в голове подозрение о том, что для многих сигналы -- это магия из серии "если что-то не выходит, наверняка для этого нужны сигналы" :-). Хочу раскрыть тему, потому как рамки форумного ответа особо разгуляться не позволяют. Сигналы синхронны Часто совет (неверный) использовать сигналы встречается в ситуации, когда нужно в веб-запросе сделать какую-то потенциально долгую операцию, и хочется, чтобы она выполнилась как-нибудь в фоне (асинхронно, то есть), чтобы пользователь получил уже какой-нибудь ответ до того, как эта операция завершить. Но сигналы тут совсем ни причем. Не знаю, откуда берется идея, что они выполняются в каком-то другом времени. Возможно из-за того, что механизм их работы где-то там в глубине скрыт, и просто хочется верить, что сделано так как раз для асинхронности (а для чего ещё?). А может виной всему опыт использования POSIX'овых сигналов, которые присылаются ОС в некие произвольные моменты времени и с точки зрения программы действительно происходят асинхронно с её процессом исполнения. На самом же деле механизм вызова сигнала по сути своей прост, как доска. Точнее, как цикл "for". Представьте, что у вас где-то в системе есть глобальный словарик такого рода: signals = … -
Зачем нужны сигналы
На днях у меня в форуме возникли почти подряд два топика про сигналы. Оба напомнили мне давно закравшееся в голове подозрение о том, что для многих сигналы — это магия из серии "если что-то не выходит, наверняка для этого нужны сигналы" :-). Хочу раскрыть тему, потому как рамки форумного ответа особо разгуляться не позволяют. Сигналы синхронны Часто совет (неверный) использовать сигналы встречается в ситуации, когда нужно в веб-запросе сделать какую-то потенциально долгую операцию, и хочется, чтобы она выполнилась как-нибудь в фоне (асинхронно, то есть), чтобы пользователь получил уже какой-нибудь ответ до того, как эта операция завершить. Но сигналы тут совсем ни причем. Не знаю, откуда берется идея, что они выполняются в каком-то другом времени. Возможно из-за того, что механизм их работы где-то там в глубине скрыт, и просто хочется верить, что сделано так как раз для асинхронности (а для чего ещё?). А может виной всему опыт использования POSIX'овых сигналов, которые присылаются ОС в некие произвольные моменты времени и с точки зрения программы действительно происходят асинхронно с её процессом исполнения. На самом же деле механизм вызова сигнала по сути своей прост, как доска. Точнее, как цикл "for". Представьте, что у вас где-то в системе есть глобальный словарик такого рода: signals = … -
Зачем нужны сигналы
На днях у меня в форуме возникли почти подряд два топика про сигналы. Оба напомнили мне давно закравшееся в голове подозрение о том, что для многих сигналы — это магия из серии "если что-то не выходит, наверняка для этого нужны сигналы" :-). Хочу раскрыть тему, потому как рамки форумного ответа особо разгуляться не позволяют. Сигналы синхронны Часто совет (неверный) использовать сигналы встречается в ситуации, когда нужно в веб-запросе сделать какую-то потенциально долгую операцию, и хочется, чтобы она выполнилась как-нибудь в фоне (асинхронно, то есть), чтобы пользователь получил уже какой-нибудь ответ до того, как эта операция завершить. Но сигналы тут совсем ни причем. Не знаю, откуда берется идея, что они выполняются в каком-то другом времени. Возможно из-за того, что механизм их работы где-то там в глубине скрыт, и просто хочется верить, что сделано так как раз для асинхронности (а для чего ещё?). А может виной всему опыт использования POSIX'овых сигналов, которые присылаются ОС в некие произвольные моменты времени и с точки зрения программы действительно происходят асинхронно с её процессом исполнения. На самом же деле механизм вызова сигнала по сути своей прост, как доска. Точнее, как цикл "for". Представьте, что у вас где-то в системе есть глобальный словарик такого рода: signals = … -
Django Full Serializers - Part I
IntroductionThe wadofstuff.django.serializers python module extends Django's built-in serializers, adding 3 new capabilities inspired by the Ruby on Rails JSON serializer. These parameters allow the developer more control over how their models are serialized. The additional capabilities are:excludes - a list of fields to be excluded from serialization. The excludes list takes precedence over the -
Meine Top3-Entwicklungstools
Blog-Parade! Das Ziel, ausgerufen von MSDN Deutschland, ist dabei heute, seine Lieblings-Entwickler-Tools vorzustellen. Da will ich sogleich starten: Platz 3 nimmt das XAMPP Projekt ein. Mit dieser tollen Sammlung bekommt man alles, was man braucht, um lokal mehr oder minder schöne Webseiten zu entwickeln: Webserver, Datenbank und Emailversendeding. Und man kann es überall mit hin nehmen, z.B. auf den USB Stick. In der goldenen Mitte steht SVN, die Open-Source-Lösung zur Softwareversionierung. Da ich ja ein alter Windows-Hase bin, nutze ich VisualSVN, den meiner Meinung nach besten und schönsten SVN-Server für Windows, und TortoiseSVN als Client. SVN hat mir schon mehrfach den Arsch gerettet, zum Glück committe ich immer relativ häfig. Auch unverzichtbar beim Entwickeln von TYPO3-Extensions. Platz Numero Uno nimmt eindeutig die Eclipse IDE bei mir ein. Ohne dieses wertvolle Tool entsteht eigentlich keine Zeile Code. Die Vorteile liegen auf der Hand: kostet nix, zuverlässig, schier unendlich erweiterbar. Ich nutze dabei das Bundle "Eclipse IDE für Java EE Developers", welches zusätzlich mit PDT, Subclipse und dem Google Appengine SDK gepimpt ist. Damit ist eigentlich alles, was ich so programmiere, abgedeckt. Ich könnte noch ein wenig weiter auflisten, aber das ist jetzt nicht Sinn der Sache. Also nochmal kurz: 1. Eclipse … -
Código fonte do Django People liberado
Simon Willison anunciou em seu blog a liberação do código fonte do site Django People Segundo a informação do README do projeto, foi feito uma importação da base do código de Abril de 2008, assim, o código precisa de uma versão mais antiga do Django, a 0.97 para rodar. O código está disponível no github e o post anunciando o lançamento do código pode ser lido aqui. -
Solango Tips and Gotchas
For the last week or so I've been wrapping my brain around Solr and Solango. The whole time that I've been doing this I've had the feeling that they can do awesome, powerful things but they're documentation is so poor that I couldn't figure anything out beyond the basic examples. Ultimately I had to dig through a bunch of code and do some experimentation. Now that I've finally figured out how to do what I've been trying to do and have wrapped my brain around some of the trickier bits I'm going to share some of the gotchas and solutions I've found. -
django-cachepurge 0.1a
I have released django-cachepurge 0.1a. It is available as an egg for an easy installation with buildout or virtualenv+easy_install, for example.This package allows django to purge HTTP cache when a model instance is changed or deleted. It does this by sending asynchronous "PURGE" requests to one or more upstream HTTP cache (such as Squid or Varnish). It is inspired by Plone CacheFu components (more specifically: CMFSquidTool).Unfortunatly Django does not have a "post_commit" signal (it would be the best place to do such a job), so purge requests are sent when response has been computed: if an exception occurs during response the urls are not purged. This is done by the middleware.Pre-requisite: the cache must be configured to accept and handle "PURGE" requests from the server where the django application is hosted.Configuration on django side:The application must be the first app declared in settings.INSTALLED_APP. The reason is that it listens to the class_prepared signal to connect post_save and post_delete handlers on eligible models (more on that below). If you put other app before django-cachepurge it may miss their models. Note that the package name uses an underscore.INSTALLED_APPS = ( 'django_cachepurge', ... )add "django_cachepurge.middleware.CachePurge" in settings.MIDDLEWARE_CLASSESdefine settings.CACHE_URLS to the cache root for … -
Django Clippings for BBEdit
I took a break from Emacs this weekend to give the new version of BBEdit a spin. The first thing I noticed was that it doesn't have snippets (clippings are the accurate term) for Django. Personally, I use yasnippet in Emacs so I took an hour and converted the library I use to clippings for BBEdit in the hopes someone finds them useful. -
Find relation between two models
Today one of my teammates and I were working on a complex SQL query which was beyond Django’s ORM normal API, so we had to use the extra method to build the query. After running with a couple of issues with PostgreSQL’s GROUP BY we decided to opt quickly for subquieries, and in no time we had our query done. The problem was though, that we had to do this operation on several models that where similar to each other, the only thing that changed was the WHERE clause depending on the models involved. So I set off so find a way to automatically discover which was the relation between two models. In short time I discovered this: MyModel._meta.get_all_related_objects(). This returns a list of RelatedObject instances that tell us about which models point to MyModel though a foreign key, cool! So, let us suppose we have a Car model and a Rental model. The Rental model has a ForeingKey to Car, to know how they are related I built something like this: for r in target_model._meta.get_all_related_objects(): if r.model == ranking_model: relation = r for r in Car._meta.get_all_related_objects(): if r.model == Rental: relation = r break now in relation I have … -
Configuring Apache + mod_wsgi + django… on Virtual Box serving files from Windows 7!
If you enjoy reading about weird software combinations let me tell you about my system configuration. I am currently using Windows 7 RC as my primary development OS (I quickly replaced my XP SP3) and I am finding it quite good to use (waiting for that new Fedora with the lovely Kde 4.2 to come out). In any case. I wanted to test how to set up Apache on a linux machine, but I didn’t want to go through the hassle of partitioning my HDD (not yet) so I decided to try Sun’s Virtual Box virtualization solution. I got my Fedora 10 distro up and running in a jiffy, including the “Guest additions” that worked right out of the box (something that never really worked for me with VMWare). So, soon I started installing all the necessary packages for our project: yum install Django yum install python-psycopg2 yum install python-markdown yum install python-dateutil yum install mod_wsgi I did have to download and install the PIL library by hand because I didn’t find the appropiate package for fedora and I already knew I could downlaod the tar.gz file from their site and use the infamous setup.py install command to install it. … -
Django Serializer Updates
I've had a couple of emails and forum posts where users were having difficulty with my serialization module. The problems mostly centered around installing it correctly.I did a little work tonight to clean up the installation side of things. As a result you can now find the module in the Cheese Shop.The latest stable release for the serialization module can also be obtained by:Running -
DaGood Django breadcrumbs
Just wanted to post the code for simple creation of breadcrumbs that I use for Django. Basically it allows you instead of this: <a href="{{url_var}}">Title of breadcrumb</a> <img src="arrow.gif" /> to do this: {% breadcrumb "Title of breadcrumb" url_var %} and instead of: <a href="{% url url_name arg1 %}" >Title of breadcrumb</a> <img src="arrow.gif" /> to write this: {% breadcrumb_url 'Title of breadcrumb' url_name arg1 %} Get it at django snippets here: http://www.djangosnippets.org/snippets/1289/ The more comprehensive example can be found at my stack overflow answer to a breadcrumb question.